Merge "msm8960: Add support for new baseband SGLTE2"
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index adeca41..a4aab73 100644
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -104,6 +104,8 @@
 /* Assuming unauthorized kernel image by default */
 static int auth_kernel_img = 0;
 
+static uint32_t app_dev_tree = 0;
+
 static device_info device = {DEVICE_MAGIC, 0, 0};
 
 static struct udc_device surf_udc_device = {
@@ -412,7 +414,6 @@
 		dprintf(CRITICAL, "ERROR: Updating Device Tree Failed \n");
 		ASSERT(0);
 	}
-
 	dprintf(INFO, "Updating device tree: done\n");
 #else
 	/* Generating the Atags */
@@ -453,6 +454,7 @@
 	unsigned offset = 0;
 	unsigned long long ptn = 0;
 	const char *cmdline;
+	void *tags;
 	int index = INVALID_PTN;
 
 	unsigned char *image_addr = 0;
@@ -594,6 +596,16 @@
 
 			/* Read device device tree in the "tags_add */
 			memmove((void *)hdr->tags_addr, (char *)dt_table_offset + dt_entry_ptr->offset, dt_entry_ptr->size);
+		} else {
+				/*
+				 * Look for appended device tree if DTB is not found in boot image
+				 * If found load the kernel & boot up
+				 */
+				app_dev_tree = dev_tree_appended((void*) hdr->kernel_addr);
+				if (!app_dev_tree) {
+					dprintf(CRITICAL, "ERROR: Appended Device Tree Blob not found\n");
+					return -1;
+				}
 		}
 		#endif
 		/* Make sure everything from scratch address is read before next step!*/
@@ -676,6 +688,16 @@
 				dprintf(CRITICAL, "ERROR: Cannot read device tree\n");
 				return -1;
 			}
+		} else {
+				/*
+				 * Look for appended device tree if DTB is not found in boot image
+				 * If found load the kernel & boot up
+				 */
+				app_dev_tree = dev_tree_appended((void*) hdr->kernel_addr);
+				if (!app_dev_tree) {
+					dprintf(CRITICAL, "ERROR: Appended Device Tree Blob not found\n");
+					return -1;
+				}
 		}
 		#endif
 	}
@@ -688,7 +710,17 @@
 		cmdline = DEFAULT_CMDLINE;
 	}
 
-	boot_linux((void *)hdr->kernel_addr, (unsigned *) hdr->tags_addr,
+	/*
+	 * If appended dev tree is found, update the atags with
+	 * memory address to the DTB appended location on RAM.
+	 * Else update with the atags address in the kernel header
+	 */
+	if (app_dev_tree)
+		tags = (void *)app_dev_tree;
+	else
+		tags = (void *)hdr->tags_addr;
+
+	boot_linux((void *)hdr->kernel_addr, (unsigned *)tags,
 		   (const char *)cmdline, board_machtype(),
 		   (void *)hdr->ramdisk_addr, hdr->ramdisk_size);
 
@@ -1134,6 +1166,17 @@
 		memmove((void*) hdr->tags_addr,
 				boot_image_start + dt_image_offset +  dt_entry_ptr->offset,
 				dt_entry_ptr->size);
+	} else {
+		/*
+		 * Look for appended device tree if DTB is not found in boot image
+		 * If found load the kernel & boot up
+		 */
+		memmove((void*) hdr->kernel_addr, boot_image_start + page_size, hdr->kernel_size);
+		app_dev_tree = dev_tree_appended((void*) hdr->kernel_addr);
+		if (!app_dev_tree) {
+			dprintf(CRITICAL, "ERROR: Appended Device Tree Blob not found\n");
+			return -1;
+		}
 	}
 
 	/* Everything looks fine. Return success. */
@@ -1147,6 +1190,7 @@
 	unsigned ramdisk_actual;
 	struct boot_img_hdr *hdr;
 	char *ptr = ((char*) data);
+	void *tags;
 
 	if (sz < sizeof(hdr)) {
 		fastboot_fail("invalid bootimage header");
@@ -1192,7 +1236,17 @@
 	memmove((void*) hdr->ramdisk_addr, ptr + page_size + kernel_actual, hdr->ramdisk_size);
 	memmove((void*) hdr->kernel_addr, ptr + page_size, hdr->kernel_size);
 
-	boot_linux((void*) hdr->kernel_addr, (void*) hdr->tags_addr,
+	/*
+	 * If appended dev tree is found, update the atags with
+	 * memory address to the DTB appended location on RAM.
+	 * Else update with the atags address in the kernel header
+	 */
+	if (app_dev_tree)
+		tags = (void *)app_dev_tree;
+	else
+		tags = (void *)hdr->tags_addr;
+
+	boot_linux((void*) hdr->kernel_addr, (void*) tags,
 		   (const char*) hdr->cmdline, board_machtype(),
 		   (void*) hdr->ramdisk_addr, hdr->ramdisk_size);
 }
diff --git a/app/aboot/devinfo.h b/app/aboot/devinfo.h
index e990203..1d87581 100644
--- a/app/aboot/devinfo.h
+++ b/app/aboot/devinfo.h
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/app/aboot/recovery.c b/app/aboot/recovery.c
index 2cbde6a..fc14a7f 100644
--- a/app/aboot/recovery.c
+++ b/app/aboot/recovery.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010-2011, 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
@@ -9,7 +9,7 @@
  *     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
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/app/aboot/recovery.h b/app/aboot/recovery.h
index f76358f..6037213 100644
--- a/app/aboot/recovery.h
+++ b/app/aboot/recovery.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -9,7 +9,7 @@
  *     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
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/app/clocktests/clock_tests.c b/app/clocktests/clock_tests.c
index 117162d..7a83966 100644
--- a/app/clocktests/clock_tests.c
+++ b/app/clocktests/clock_tests.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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 met:
@@ -8,7 +8,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/app/nandwrite/bootimg.h b/app/nandwrite/bootimg.h
index 87a0b3a..785fa06 100644
--- a/app/nandwrite/bootimg.h
+++ b/app/nandwrite/bootimg.h
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2008 The Android Open Source Project
  * All rights reserved.
- * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009, 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
diff --git a/app/nandwrite/nandwrite.c b/app/nandwrite/nandwrite.c
index 1fdcaf1..1bd03b6 100644
--- a/app/nandwrite/nandwrite.c
+++ b/app/nandwrite/nandwrite.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2008 The Android Open Source Project
  * All rights reserved.
- * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009, 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
diff --git a/app/tests/led_tests.c b/app/tests/led_tests.c
index 36172b0..11ef9f2 100644
--- a/app/tests/led_tests.c
+++ b/app/tests/led_tests.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/dev/fbcon/fbcon.c b/dev/fbcon/fbcon.c
index 9538e3a..608f4c0 100644
--- a/dev/fbcon/fbcon.c
+++ b/dev/fbcon/fbcon.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/dev/keys/gpio_keypad.c b/dev/keys/gpio_keypad.c
index 92850ac..5f0e818 100644
--- a/dev/keys/gpio_keypad.c
+++ b/dev/keys/gpio_keypad.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2012, 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
diff --git a/dev/panel/msm/lcdc_truly.h b/dev/panel/msm/lcdc_truly.h
index acfb21d..60aa34e 100644
--- a/dev/panel/msm/lcdc_truly.h
+++ b/dev/panel/msm/lcdc_truly.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -10,7 +10,7 @@
  *    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 nor
+ *  * Neither the name of The Linux Foundation nor
  *    the names of its contributors may be used to endorse or promote
  *    products derived from this software without specific prior written
  *    permission.
diff --git a/dev/panel/msm/lcdc_truly_hvga.c b/dev/panel/msm/lcdc_truly_hvga.c
index 757194a..41290f5 100644
--- a/dev/panel/msm/lcdc_truly_hvga.c
+++ b/dev/panel/msm/lcdc_truly_hvga.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -10,7 +10,7 @@
  *    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 nor
+ *  * Neither the name of The Linux Foundation nor
  *    the names of its contributors may be used to endorse or promote
  *    products derived from this software without specific prior written
  *    permission.
diff --git a/dev/panel/msm/lvds_chimei_wxga.c b/dev/panel/msm/lvds_chimei_wxga.c
index 521e4ad..d90fbb5 100644
--- a/dev/panel/msm/lvds_chimei_wxga.c
+++ b/dev/panel/msm/lvds_chimei_wxga.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/dev/panel/msm/mipi_chimei_video_wxga.c b/dev/panel/msm/mipi_chimei_video_wxga.c
index 7fecc76..ed79dd4 100644
--- a/dev/panel/msm/mipi_chimei_video_wxga.c
+++ b/dev/panel/msm/mipi_chimei_video_wxga.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/dev/panel/msm/mipi_nt35510.c b/dev/panel/msm/mipi_nt35510.c
index f407895..e18b658 100644
--- a/dev/panel/msm/mipi_nt35510.c
+++ b/dev/panel/msm/mipi_nt35510.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/dev/panel/msm/mipi_nt35510_cmd_wvga.c b/dev/panel/msm/mipi_nt35510_cmd_wvga.c
index e79921f..dbac230 100644
--- a/dev/panel/msm/mipi_nt35510_cmd_wvga.c
+++ b/dev/panel/msm/mipi_nt35510_cmd_wvga.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/dev/panel/msm/mipi_nt35510_video_wvga.c b/dev/panel/msm/mipi_nt35510_video_wvga.c
index 2c476d6..3ddbed4 100644
--- a/dev/panel/msm/mipi_nt35510_video_wvga.c
+++ b/dev/panel/msm/mipi_nt35510_video_wvga.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/dev/panel/msm/mipi_renesas.c b/dev/panel/msm/mipi_renesas.c
index 65a58d0..1011eea 100644
--- a/dev/panel/msm/mipi_renesas.c
+++ b/dev/panel/msm/mipi_renesas.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/dev/panel/msm/mipi_renesas.h b/dev/panel/msm/mipi_renesas.h
index 60e83cf..f7c0b87 100644
--- a/dev/panel/msm/mipi_renesas.h
+++ b/dev/panel/msm/mipi_renesas.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/dev/panel/msm/mipi_renesas_cmd_fwvga.c b/dev/panel/msm/mipi_renesas_cmd_fwvga.c
index 60df2ac..52c06e9 100644
--- a/dev/panel/msm/mipi_renesas_cmd_fwvga.c
+++ b/dev/panel/msm/mipi_renesas_cmd_fwvga.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/dev/panel/msm/mipi_renesas_video_fwvga.c b/dev/panel/msm/mipi_renesas_video_fwvga.c
index bf33d31..d305813 100644
--- a/dev/panel/msm/mipi_renesas_video_fwvga.c
+++ b/dev/panel/msm/mipi_renesas_video_fwvga.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/dev/panel/msm/mipi_tc358764_dsi2lvds.c b/dev/panel/msm/mipi_tc358764_dsi2lvds.c
index 3cabe13..ac8ecf8 100644
--- a/dev/panel/msm/mipi_tc358764_dsi2lvds.c
+++ b/dev/panel/msm/mipi_tc358764_dsi2lvds.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/dev/panel/msm/mipi_tc358764_dsi2lvds.h b/dev/panel/msm/mipi_tc358764_dsi2lvds.h
index 0b93f65..5b928cc 100644
--- a/dev/panel/msm/mipi_tc358764_dsi2lvds.h
+++ b/dev/panel/msm/mipi_tc358764_dsi2lvds.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/dev/panel/msm/mipi_toshiba_video_wsvga.c b/dev/panel/msm/mipi_toshiba_video_wsvga.c
index f19c228..3fb985f 100644
--- a/dev/panel/msm/mipi_toshiba_video_wsvga.c
+++ b/dev/panel/msm/mipi_toshiba_video_wsvga.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/dev/pmic/pm8921/include/dev/pm8921_leds.h b/dev/pmic/pm8921/include/dev/pm8921_leds.h
index faad2f5..8613baa 100644
--- a/dev/pmic/pm8921/include/dev/pm8921_leds.h
+++ b/dev/pmic/pm8921/include/dev/pm8921_leds.h
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/dev/pmic/pm8921/include/dev/pm8921_pwm.h b/dev/pmic/pm8921/include/dev/pm8921_pwm.h
index 23b0930..50442f7 100644
--- a/dev/pmic/pm8921/include/dev/pm8921_pwm.h
+++ b/dev/pmic/pm8921/include/dev/pm8921_pwm.h
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/dev/pmic/pm8921/pm8921.c b/dev/pmic/pm8921/pm8921.c
index 231b8b6..cafa6a8 100644
--- a/dev/pmic/pm8921/pm8921.c
+++ b/dev/pmic/pm8921/pm8921.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2012, Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2013, 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
@@ -521,6 +521,24 @@
 	return ret;
 }
 
+int pm8921_HDMI_Switch(void)
+{
+	int ret = NO_ERROR;
+	uint8_t val;
+
+	/* Value for HDMI MVS 5V Switch */
+	val = 0x068;
+
+	/* Turn on MVS 5V HDMI switch */
+	ret = dev->write(&val, 1, PM8921_MVS_5V_HDMI_SWITCH);
+	if (ret) {
+		dprintf(CRITICAL,
+		   "Failed to turn ON MVS 5V hdmi switch ret=%d.\n", ret);
+	}
+
+	return ret;
+}
+
 int pm8921_rtc_alarm_disable(void)
 {
 	int rc;
diff --git a/dev/pmic/pm8921/pm8921_hw.h b/dev/pmic/pm8921/pm8921_hw.h
index e75026e..ea3046f 100644
--- a/dev/pmic/pm8921/pm8921_hw.h
+++ b/dev/pmic/pm8921/pm8921_hw.h
@@ -154,6 +154,8 @@
 #define PLDO_TYPE                             0
 #define NLDO_TYPE                             1
 
+#define PM8921_MVS_5V_HDMI_SWITCH             0x70
+
 #define LDO(_name, _type, _test_reg, _ctrl_reg) \
 {\
 	.name = _name,\
diff --git a/dev/pmic/pm8921/pm8921_pwm.c b/dev/pmic/pm8921/pm8921_pwm.c
index de89778..4c0df47 100644
--- a/dev/pmic/pm8921/pm8921_pwm.c
+++ b/dev/pmic/pm8921/pm8921_pwm.c
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/dev/ssbi/include/dev/ssbi.h b/dev/ssbi/include/dev/ssbi.h
index 25f9259..f368ea0 100644
--- a/dev/ssbi/include/dev/ssbi.h
+++ b/dev/ssbi/include/dev/ssbi.h
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/dev/ssbi/ssbi.c b/dev/ssbi/ssbi.c
index 5d16935..fa917ce 100644
--- a/dev/ssbi/ssbi.c
+++ b/dev/ssbi/ssbi.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/include/dev/fbcon.h b/include/dev/fbcon.h
index ebcf9d7..e8b047b 100644
--- a/include/dev/fbcon.h
+++ b/include/dev/fbcon.h
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2010, 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
diff --git a/include/dev/gpio_keypad.h b/include/dev/gpio_keypad.h
index c536e24..5ddf58d 100644
--- a/include/dev/gpio_keypad.h
+++ b/include/dev/gpio_keypad.h
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2012, 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
diff --git a/include/dev/lcdc.h b/include/dev/lcdc.h
index d935bcc..7ff9a66 100644
--- a/include/dev/lcdc.h
+++ b/include/dev/lcdc.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
diff --git a/include/errno.h b/include/errno.h
index aa53c68..ef727a4 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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 met:
@@ -8,7 +8,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/include/lib/ptable.h b/include/lib/ptable.h
index e1d970f..482ef57 100644
--- a/include/lib/ptable.h
+++ b/include/lib/ptable.h
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2012, 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
diff --git a/kernel/main.c b/kernel/main.c
index efbb9e9..1167f31 100644
--- a/kernel/main.c
+++ b/kernel/main.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2008 Travis Geiselbrecht
  *
- * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009, The Linux Foundation. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining
  * a copy of this software and associated documentation files
diff --git a/lib/libfdt/README.license b/lib/libfdt/README.license
index 26b8757..7bfcd5a 100644
--- a/lib/libfdt/README.license
+++ b/lib/libfdt/README.license
@@ -1,6 +1,6 @@
 /*
  libfdt in this distribution was received under the 2-Clause BSD license
- choice by Code Aurora Forum and is used as a part of the LK Bootloader
+ choice by The Linux Foundation and is used as a part of the LK Bootloader
  subject to the LK Bootloader license.
 */
 
diff --git a/lib/ptable/ptable.c b/lib/ptable/ptable.c
index 33afd9f..6a67d68 100644
--- a/lib/ptable/ptable.c
+++ b/lib/ptable/ptable.c
@@ -2,7 +2,7 @@
  * Copyright (C) 2008 The Android Open Source Project
  * All rights reserved.
  *
- *Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved.
+ *Copyright (c) 2009-2012, 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
diff --git a/platform/mdm9x15/acpuclock.c b/platform/mdm9x15/acpuclock.c
index 6096731..81b3c35 100644
--- a/platform/mdm9x15/acpuclock.c
+++ b/platform/mdm9x15/acpuclock.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/platform/mdm9x15/gpio.c b/platform/mdm9x15/gpio.c
index e8ad188..fbc97af 100644
--- a/platform/mdm9x15/gpio.c
+++ b/platform/mdm9x15/gpio.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -9,7 +9,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/mdm9x15/include/platform/clock.h b/platform/mdm9x15/include/platform/clock.h
index 4ab0dca..15f3190 100644
--- a/platform/mdm9x15/include/platform/clock.h
+++ b/platform/mdm9x15/include/platform/clock.h
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/mdm9x15/include/platform/gpio.h b/platform/mdm9x15/include/platform/gpio.h
index 7d7ec92..45d3730 100644
--- a/platform/mdm9x15/include/platform/gpio.h
+++ b/platform/mdm9x15/include/platform/gpio.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -9,7 +9,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/mdm9x15/include/platform/iomap.h b/platform/mdm9x15/include/platform/iomap.h
index f5c9305..4171c73 100644
--- a/platform/mdm9x15/include/platform/iomap.h
+++ b/platform/mdm9x15/include/platform/iomap.h
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
diff --git a/platform/mdm9x15/include/platform/irqs.h b/platform/mdm9x15/include/platform/irqs.h
index 32230f7..71ed4d9 100644
--- a/platform/mdm9x15/include/platform/irqs.h
+++ b/platform/mdm9x15/include/platform/irqs.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009-2011, 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 met:
@@ -7,7 +7,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/platform/mdm9x15/platform.c b/platform/mdm9x15/platform.c
index eea6f81..d05b28e 100644
--- a/platform/mdm9x15/platform.c
+++ b/platform/mdm9x15/platform.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/platform/mdm9x25/include/platform/iomap.h b/platform/mdm9x25/include/platform/iomap.h
index a19fdd0..c9cc2af 100644
--- a/platform/mdm9x25/include/platform/iomap.h
+++ b/platform/mdm9x25/include/platform/iomap.h
@@ -37,7 +37,7 @@
 /*SDRAM start address */
 #define SDRAM_START_ADDR          0x00000000
 
-#define MSM_SHARED_IMEM_BASE      0xFC42B000
+#define MSM_SHARED_IMEM_BASE      0xFC42A800
 #define RESTART_REASON_ADDR       (MSM_SHARED_IMEM_BASE + 0x65C)
 
 #define MSM_SHARED_IMEM_BASE_V2   0xFE807800
diff --git a/platform/mdm9x25/platform.c b/platform/mdm9x25/platform.c
index 0c7d280..dc903b0 100644
--- a/platform/mdm9x25/platform.c
+++ b/platform/mdm9x25/platform.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2013, 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
@@ -46,10 +46,10 @@
 #define MSM_IOMAP_SIZE                      ((MSM_IOMAP_END - MSM_IOMAP_BASE)/MB)
 
 /* LK memory - Strongly ordered, executable */
-#define LK_MEMORY                             (MMU_MEMORY_TYPE_STRONGLY_ORDERED | \
+#define LK_MEMORY                             (MMU_MEMORY_TYPE_NORMAL | \
                                               MMU_MEMORY_AP_READ_WRITE)
 /* Scratch memory - Strongly ordered, non-executable */
-#define SCRATCH_MEMORY                        (MMU_MEMORY_TYPE_STRONGLY_ORDERED | \
+#define SCRATCH_MEMORY                        (MMU_MEMORY_TYPE_NORMAL | \
                                               MMU_MEMORY_AP_READ_WRITE | MMU_MEMORY_XN)
 /* Peripherals - shared device */
 #define IOMAP_MEMORY                          (MMU_MEMORY_TYPE_DEVICE_SHARED | \
diff --git a/platform/msm7k/platform.c b/platform/msm7k/platform.c
index dfbb4db..d55b1d3 100644
--- a/platform/msm7k/platform.c
+++ b/platform/msm7k/platform.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2010, 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
diff --git a/platform/msm7x27a/arch_init.S b/platform/msm7x27a/arch_init.S
index 4d4a7c5..3826494 100644
--- a/platform/msm7x27a/arch_init.S
+++ b/platform/msm7x27a/arch_init.S
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/platform/msm7x27a/include/platform/clock.h b/platform/msm7x27a/include/platform/clock.h
index 096df56..be071ef 100644
--- a/platform/msm7x27a/include/platform/clock.h
+++ b/platform/msm7x27a/include/platform/clock.h
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/msm7x27a/include/platform/gpio.h b/platform/msm7x27a/include/platform/gpio.h
index 2733e28..f3c18cf 100644
--- a/platform/msm7x27a/include/platform/gpio.h
+++ b/platform/msm7x27a/include/platform/gpio.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/msm7x27a/include/platform/irqs.h b/platform/msm7x27a/include/platform/irqs.h
index d5dce0f..c1cf095 100644
--- a/platform/msm7x27a/include/platform/irqs.h
+++ b/platform/msm7x27a/include/platform/irqs.h
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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
diff --git a/platform/msm7x27a/interrupts.c b/platform/msm7x27a/interrupts.c
index fdc7798..d85e1e6 100644
--- a/platform/msm7x27a/interrupts.c
+++ b/platform/msm7x27a/interrupts.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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
diff --git a/platform/msm7x27a/platform.c b/platform/msm7x27a/platform.c
index af06684..50869d5 100755
--- a/platform/msm7x27a/platform.c
+++ b/platform/msm7x27a/platform.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2012, 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
diff --git a/platform/msm7x30/arch_init.S b/platform/msm7x30/arch_init.S
index 8093152..bee9ff1 100644
--- a/platform/msm7x30/arch_init.S
+++ b/platform/msm7x30/arch_init.S
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2010, 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
diff --git a/platform/msm7x30/gpio.c b/platform/msm7x30/gpio.c
index 2370794..aaf8bb1 100644
--- a/platform/msm7x30/gpio.c
+++ b/platform/msm7x30/gpio.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2010, 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
diff --git a/platform/msm7x30/gpio_hw.h b/platform/msm7x30/gpio_hw.h
index 650ea7a..174bd39 100644
--- a/platform/msm7x30/gpio_hw.h
+++ b/platform/msm7x30/gpio_hw.h
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2010, 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
diff --git a/platform/msm7x30/include/platform/adm.h b/platform/msm7x30/include/platform/adm.h
index fc703eb..74ba1c1 100644
--- a/platform/msm7x30/include/platform/adm.h
+++ b/platform/msm7x30/include/platform/adm.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm7x30/include/platform/iomap.h b/platform/msm7x30/include/platform/iomap.h
index e05f618..5b945e7 100644
--- a/platform/msm7x30/include/platform/iomap.h
+++ b/platform/msm7x30/include/platform/iomap.h
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/platform/msm7x30/include/platform/irqs.h b/platform/msm7x30/include/platform/irqs.h
index 2df1f28..f141bbf 100644
--- a/platform/msm7x30/include/platform/irqs.h
+++ b/platform/msm7x30/include/platform/irqs.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009, 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 met:
@@ -7,7 +7,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/platform/msm7x30/include/platform/machtype.h b/platform/msm7x30/include/platform/machtype.h
index e80c9d0..e096cc8 100644
--- a/platform/msm7x30/include/platform/machtype.h
+++ b/platform/msm7x30/include/platform/machtype.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm7x30/include/platform/remote_spinlock.h b/platform/msm7x30/include/platform/remote_spinlock.h
index 61711c6..5fa1c49 100644
--- a/platform/msm7x30/include/platform/remote_spinlock.h
+++ b/platform/msm7x30/include/platform/remote_spinlock.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm7x30/panel.c b/platform/msm7x30/panel.c
index 510b2fc..c1fef31 100644
--- a/platform/msm7x30/panel.c
+++ b/platform/msm7x30/panel.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2007, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
@@ -13,7 +13,7 @@
  *    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 nor
+ *  * Neither the name of The Linux Foundation nor
  *    the names of its contributors may be used to endorse or promote
  *    products derived from this software without specific prior written
  *    permission.
diff --git a/platform/msm7x30/panel.h b/platform/msm7x30/panel.h
index cb85901..de94839 100644
--- a/platform/msm7x30/panel.h
+++ b/platform/msm7x30/panel.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
diff --git a/platform/msm7x30/panel_sharp_wvga.c b/platform/msm7x30/panel_sharp_wvga.c
index a70185b..367cdc4 100644
--- a/platform/msm7x30/panel_sharp_wvga.c
+++ b/platform/msm7x30/panel_sharp_wvga.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *    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 nor
+ *  * Neither the name of The Linux Foundation nor
  *    the names of its contributors may be used to endorse or promote
  *    products derived from this software without specific prior written
  *    permission.
diff --git a/platform/msm7x30/platform.c b/platform/msm7x30/platform.c
index 527fc58..3232557 100755
--- a/platform/msm7x30/platform.c
+++ b/platform/msm7x30/platform.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/platform/msm7x30/remote_spinlock.c b/platform/msm7x30/remote_spinlock.c
index 93a509a..f547abd 100644
--- a/platform/msm7x30/remote_spinlock.c
+++ b/platform/msm7x30/remote_spinlock.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm8226/acpuclock.c b/platform/msm8226/acpuclock.c
index f1b3d41..df4c7f6 100644
--- a/platform/msm8226/acpuclock.c
+++ b/platform/msm8226/acpuclock.c
@@ -175,3 +175,7 @@
 	}
 }
 
+void clock_config_ce(uint8_t instance)
+{
+}
+
diff --git a/platform/msm8226/gpio.c b/platform/msm8226/gpio.c
index b869367..f184fb0 100644
--- a/platform/msm8226/gpio.c
+++ b/platform/msm8226/gpio.c
@@ -50,6 +50,11 @@
 	return;
 }
 
+uint32_t gpio_status(uint32_t gpio)
+{
+	return readl(GPIO_IN_OUT_ADDR(gpio)) & GPIO_IN;
+}
+
 /* Configure gpio for blsp uart 2 */
 void gpio_config_uart_dm(uint8_t id)
 {
diff --git a/platform/msm8226/include/platform/clock.h b/platform/msm8226/include/platform/clock.h
index b549dd1..118428a 100644
--- a/platform/msm8226/include/platform/clock.h
+++ b/platform/msm8226/include/platform/clock.h
@@ -40,5 +40,6 @@
 void clock_config_mmc(uint32_t interface, uint32_t freq);
 void clock_config_uart_dm(uint8_t id);
 void hsusb_clock_init(void);
+void clock_config_ce(uint8_t instance);
 
 #endif
diff --git a/platform/msm8226/include/platform/gpio.h b/platform/msm8226/include/platform/gpio.h
index 51a1ce0..ac554da 100644
--- a/platform/msm8226/include/platform/gpio.h
+++ b/platform/msm8226/include/platform/gpio.h
@@ -29,6 +29,8 @@
 #ifndef __PLATFORM_MSM8226_GPIO_H
 #define __PLATFORM_MSM8226_GPIO_H
 
+#include <bits.h>
+
 /* GPIO TLMM: Direction */
 #define GPIO_INPUT      0
 #define GPIO_OUTPUT     1
@@ -53,6 +55,17 @@
 #define GPIO_ENABLE     0
 #define GPIO_DISABLE    1
 
+/* GPIO_IN_OUT register shifts. */
+#define GPIO_IN         BIT(0)
+#define GPIO_OUT        BIT(1)
+
 void gpio_config_uart_dm(uint8_t id);
+uint32_t gpio_status(uint32_t gpio);
+void gpio_tlmm_config(uint32_t gpio,
+                      uint8_t func,
+                      uint8_t dir,
+                      uint8_t pull,
+                      uint8_t drvstr,
+                      uint32_t enable);
 
 #endif
diff --git a/platform/msm8226/include/platform/iomap.h b/platform/msm8226/include/platform/iomap.h
index 5a49bb9..9519882 100644
--- a/platform/msm8226/include/platform/iomap.h
+++ b/platform/msm8226/include/platform/iomap.h
@@ -38,6 +38,9 @@
 
 #define APPS_SS_BASE                0xF9000000
 
+#define SYSTEM_IMEM_BASE            0xFE800000
+#define RESTART_REASON_ADDR         (SYSTEM_IMEM_BASE + 0x565C)
+
 #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 1be05ed..ecec907 100644
--- a/platform/msm8226/platform.c
+++ b/platform/msm8226/platform.c
@@ -35,6 +35,7 @@
 
 void platform_early_init(void)
 {
+	board_init();
 	platform_clock_init();
 	qgic_init();
 	qtimer_init();
diff --git a/platform/msm8960/clock.c b/platform/msm8960/clock.c
index 0b19c82..ac5378c 100644
--- a/platform/msm8960/clock.c
+++ b/platform/msm8960/clock.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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 met:
@@ -8,7 +8,7 @@
  *   * 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 nor
+ *   * Neither the name of The Linux Foundation nor
  *     the names of its contributors may be used to endorse or promote
  *     products derived from this software without specific prior written
  *     permission.
diff --git a/platform/msm8960/gpio.c b/platform/msm8960/gpio.c
index 07d05a0..57d2591 100755
--- a/platform/msm8960/gpio.c
+++ b/platform/msm8960/gpio.c
@@ -253,11 +253,8 @@
 	int i = 0;
 	int num = 0;
 	struct pm8xxx_gpio_init *gpio_array;
-	uint32_t pmic_type;
 
-	pmic_type = board_pmic_type();
-
-	if (pmic_type == PMIC_IS_PM8917)
+	if (platform_pmic_type(PMIC_IS_PM8917))
 	{
 		num = ARRAY_SIZE(pm8917_keypad_gpios);
 		gpio_array = pm8917_keypad_gpios;
@@ -280,11 +277,8 @@
 	int i = 0;
 	int num = 0;
 	struct pm8xxx_gpio_init *gpio_array;
-	uint32_t pmic_type;
 
-	pmic_type = board_pmic_type();
-
-	if (pmic_type == PMIC_IS_PM8917)
+	if (platform_pmic_type(PMIC_IS_PM8917))
 	{
 		num = ARRAY_SIZE(pm8917_keypad_gpios_apq);
 		gpio_array = pm8917_keypad_gpios_apq;
diff --git a/platform/msm8960/hdmi_core.c b/platform/msm8960/hdmi_core.c
new file mode 100644
index 0000000..8d6ff34
--- /dev/null
+++ b/platform/msm8960/hdmi_core.c
@@ -0,0 +1,404 @@
+/* Copyright (c) 2009-2013, 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
+ * 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 The Linux Foundation 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.
+ *
+ */
+
+#include <hdmi.h>
+#include <dev/pm8921.h>
+#include <platform/timer.h>
+#include <platform/gpio.h>
+#include <platform/clock.h>
+#include <platform/iomap.h>
+
+extern void hdmi_app_clk_init(int);
+extern int hdmi_msm_turn_on();
+
+/* HDMI PLL macros */
+#define HDMI_PHY_PLL_REFCLK_CFG          (MSM_HDMI_BASE + 0x00000500)
+#define HDMI_PHY_PLL_CHRG_PUMP_CFG       (MSM_HDMI_BASE + 0x00000504)
+#define HDMI_PHY_PLL_LOOP_FLT_CFG0       (MSM_HDMI_BASE + 0x00000508)
+#define HDMI_PHY_PLL_LOOP_FLT_CFG1       (MSM_HDMI_BASE + 0x0000050c)
+#define HDMI_PHY_PLL_IDAC_ADJ_CFG        (MSM_HDMI_BASE + 0x00000510)
+#define HDMI_PHY_PLL_I_VI_KVCO_CFG       (MSM_HDMI_BASE + 0x00000514)
+#define HDMI_PHY_PLL_PWRDN_B             (MSM_HDMI_BASE + 0x00000518)
+#define HDMI_PHY_PLL_SDM_CFG0            (MSM_HDMI_BASE + 0x0000051c)
+#define HDMI_PHY_PLL_SDM_CFG1            (MSM_HDMI_BASE + 0x00000520)
+#define HDMI_PHY_PLL_SDM_CFG2            (MSM_HDMI_BASE + 0x00000524)
+#define HDMI_PHY_PLL_SDM_CFG3            (MSM_HDMI_BASE + 0x00000528)
+#define HDMI_PHY_PLL_SDM_CFG4            (MSM_HDMI_BASE + 0x0000052c)
+#define HDMI_PHY_PLL_SSC_CFG0            (MSM_HDMI_BASE + 0x00000530)
+#define HDMI_PHY_PLL_SSC_CFG1            (MSM_HDMI_BASE + 0x00000534)
+#define HDMI_PHY_PLL_SSC_CFG2            (MSM_HDMI_BASE + 0x00000538)
+#define HDMI_PHY_PLL_SSC_CFG3            (MSM_HDMI_BASE + 0x0000053c)
+#define HDMI_PHY_PLL_LOCKDET_CFG0        (MSM_HDMI_BASE + 0x00000540)
+#define HDMI_PHY_PLL_LOCKDET_CFG1        (MSM_HDMI_BASE + 0x00000544)
+#define HDMI_PHY_PLL_LOCKDET_CFG2        (MSM_HDMI_BASE + 0x00000548)
+#define HDMI_PHY_PLL_VCOCAL_CFG0         (MSM_HDMI_BASE + 0x0000054c)
+#define HDMI_PHY_PLL_VCOCAL_CFG1         (MSM_HDMI_BASE + 0x00000550)
+#define HDMI_PHY_PLL_VCOCAL_CFG2         (MSM_HDMI_BASE + 0x00000554)
+#define HDMI_PHY_PLL_VCOCAL_CFG3         (MSM_HDMI_BASE + 0x00000558)
+#define HDMI_PHY_PLL_VCOCAL_CFG4         (MSM_HDMI_BASE + 0x0000055c)
+#define HDMI_PHY_PLL_VCOCAL_CFG5         (MSM_HDMI_BASE + 0x00000560)
+#define HDMI_PHY_PLL_VCOCAL_CFG6         (MSM_HDMI_BASE + 0x00000564)
+#define HDMI_PHY_PLL_VCOCAL_CFG7         (MSM_HDMI_BASE + 0x00000568)
+#define HDMI_PHY_PLL_DEBUG_SEL           (MSM_HDMI_BASE + 0x0000056c)
+#define HDMI_PHY_PLL_PWRDN_B             (MSM_HDMI_BASE + 0x00000518)
+#define HDMI_PHY_PLL_STATUS0             (MSM_HDMI_BASE + 0x00000598)
+
+/* HDMI PHY/PLL bit field macros */
+#define SW_RESET BIT(2)
+#define SW_RESET_PLL BIT(0)
+#define PWRDN_B BIT(7)
+
+#define PLL_PWRDN_B BIT(3)
+#define PD_PLL BIT(1)
+
+static unsigned hdmi_pll_on;
+
+void hdmi_msm_init_phy()
+{
+	dprintf(INFO, "phy init\n");
+	uint32_t offset;
+
+	writel(0x1B, HDMI_PHY_REG_0);
+	writel(0xf2, HDMI_PHY_REG_1);
+
+	offset = HDMI_PHY_REG_4;
+	while (offset <= HDMI_PHY_REG_11) {
+		writel(0x0, offset);
+		offset += 0x4;
+	}
+
+	writel(0x20, HDMI_PHY_REG_3);
+}
+
+static void hdmi_gpio_config()
+{
+	writel(0x07, GPIO_CONFIG_ADDR(70));
+	writel(0x07, GPIO_CONFIG_ADDR(71));
+	writel(0x05, GPIO_CONFIG_ADDR(72));
+}
+
+void hdmi_msm_reset_core()
+{
+	uint32_t reg_val = 0;
+
+	// Disable clocks
+	hdmi_app_clk_init(0);
+	udelay(5);
+	// Enable clocks
+	hdmi_app_clk_init(1);
+
+	reg_val = readl(SW_RESET_CORE_REG);
+	reg_val |= BIT(11);
+	writel(reg_val, SW_RESET_CORE_REG);
+	udelay(5);
+	reg_val = readl(SW_RESET_CORE_REG);
+	reg_val &= ~(BIT(11));
+	writel(reg_val, SW_RESET_CORE_REG);
+	udelay(5);
+}
+
+void hdmi_phy_reset(void)
+{
+	uint32_t phy_reset_polarity = 0x0;
+	uint32_t pll_reset_polarity = 0x0;
+
+	uint32_t val = readl(HDMI_PHY_CTRL);
+
+	phy_reset_polarity = val >> 3 & 0x1;
+	pll_reset_polarity = val >> 1 & 0x1;
+
+	if (phy_reset_polarity == 0)
+		writel(val | SW_RESET, HDMI_PHY_CTRL);
+	else
+		writel(val & (~SW_RESET), HDMI_PHY_CTRL);
+
+	if (pll_reset_polarity == 0)
+		writel(val | SW_RESET_PLL, HDMI_PHY_CTRL);
+	else
+		writel(val & (~SW_RESET_PLL), HDMI_PHY_CTRL);
+
+	udelay(10);
+
+	if (phy_reset_polarity == 0)
+		writel(val & (~SW_RESET), HDMI_PHY_CTRL);
+	else
+		writel(val | SW_RESET, HDMI_PHY_CTRL);
+
+	if (pll_reset_polarity == 0)
+		writel(val & (~SW_RESET_PLL), HDMI_PHY_CTRL);
+	else
+		writel(val | SW_RESET_PLL, HDMI_PHY_CTRL);
+}
+
+/*
+ * This is the start function which initializes clocks , gpios for hdmi
+ * & powers on the HDMI core
+ */
+void hdmi_power_init()
+{
+	pm8921_low_voltage_switch_enable(lvs_7);
+	apq8064_ext_3p3V_enable();
+	pm8921_HDMI_Switch();
+	hdmi_gpio_config();
+	hdmi_phy_reset();
+	hdmi_msm_set_mode(1);
+}
+
+void hdmi_pll_disable(void)
+{
+	uint32_t val;
+	uint32_t ahb_en_reg, ahb_enabled;
+
+	ahb_en_reg = readl(AHB_EN_REG);
+	ahb_enabled = ahb_en_reg & BIT(4);
+	if (!ahb_enabled) {
+		writel(ahb_en_reg | BIT(4), AHB_EN_REG);
+		udelay(10);
+	}
+
+	val = readl(HDMI_PHY_REG_12);
+	val &= (~PWRDN_B);
+	writel(val, HDMI_PHY_REG_12);
+
+	val = readl(HDMI_PHY_PLL_PWRDN_B);
+	val |= PD_PLL;
+	val &= (~PLL_PWRDN_B);
+	writel(val, HDMI_PHY_PLL_PWRDN_B);
+	/* Make sure HDMI PHY/PLL are powered down */
+	udelay(10);
+
+	if (!ahb_enabled)
+		writel(ahb_en_reg & ~BIT(4), AHB_EN_REG);
+	hdmi_pll_on = 0;
+}
+
+void hdmi_pll_enable(void)
+{
+	uint32_t val;
+	uint32_t ahb_en_reg, ahb_enabled;
+	uint32_t timeout_count;
+	int pll_lock_retry = 10;
+
+	ahb_en_reg = readl(AHB_EN_REG);
+	ahb_enabled = ahb_en_reg & BIT(4);
+	if (!ahb_enabled) {
+		dprintf(INFO, "ahb not enabled\n");
+		writel(ahb_en_reg | BIT(4), AHB_EN_REG);
+		/* Make sure iface clock is enabled before register access */
+		udelay(10);
+	}
+
+	/* Assert PLL S/W reset */
+	writel(0x8D, HDMI_PHY_PLL_LOCKDET_CFG2);
+	writel(0x10, HDMI_PHY_PLL_LOCKDET_CFG0);
+	writel(0x1A, HDMI_PHY_PLL_LOCKDET_CFG1);
+	/* Wait for a short time before de-asserting
+	 * to allow the hardware to complete its job.
+	 * This much of delay should be fine for hardware
+	 * to assert and de-assert.
+	 */
+	udelay(10);
+	/* De-assert PLL S/W reset */
+	writel(0x0D, HDMI_PHY_PLL_LOCKDET_CFG2);
+
+	val = readl(HDMI_PHY_REG_12);
+	val |= BIT(5);
+	/* Assert PHY S/W reset */
+	writel(val, HDMI_PHY_REG_12);
+	val &= ~BIT(5);
+	/* Wait for a short time before de-asserting
+	   to allow the hardware to complete its job.
+	   This much of delay should be fine for hardware
+	   to assert and de-assert. */
+	udelay(10);
+	/* De-assert PHY S/W reset */
+	writel(val, HDMI_PHY_REG_12);
+	writel(0x3f, HDMI_PHY_REG_2);
+
+	val = readl(HDMI_PHY_REG_12);
+	val |= PWRDN_B;
+	writel(val, HDMI_PHY_REG_12);
+	/* Wait 10 us for enabling global power for PHY */
+	udelay(10);
+
+	val = readl(HDMI_PHY_PLL_PWRDN_B);
+	val |= PLL_PWRDN_B;
+	val &= ~PD_PLL;
+	writel(val, HDMI_PHY_PLL_PWRDN_B);
+	writel(0x80, HDMI_PHY_REG_2);
+
+	timeout_count = 1000;
+	while (!(readl(HDMI_PHY_PLL_STATUS0) & BIT(0)) &&
+			timeout_count && pll_lock_retry) {
+		if (--timeout_count == 0) {
+			dprintf(INFO, "PLL not locked, retry\n");
+			/*
+			 * PLL has still not locked.
+			 * Do a software reset and try again
+			 * Assert PLL S/W reset first
+			 */
+			writel(0x8D, HDMI_PHY_PLL_LOCKDET_CFG2);
+
+			/* Wait for a short time before de-asserting
+			 * to allow the hardware to complete its job.
+			 * This much of delay should be fine for hardware
+			 * to assert and de-assert.
+			 */
+			udelay(10);
+			writel(0x0D, HDMI_PHY_PLL_LOCKDET_CFG2);
+
+			/*
+			 * Wait for a short duration for the PLL calibration
+			 * before checking if the PLL gets locked
+			 */
+			udelay(350);
+
+			timeout_count = 1000;
+			pll_lock_retry--;
+		}
+	}
+
+	if (!ahb_enabled) {
+		writel(ahb_en_reg & ~BIT(4), AHB_EN_REG);
+		udelay(10);
+	}
+
+	if (!pll_lock_retry) {
+		dprintf(INFO, "%s: HDMI PLL not locked\n", __func__);
+		hdmi_pll_disable();
+	}
+
+	hdmi_pll_on = 1;
+}
+
+
+int hdmi_dtv_on()
+{
+	uint32_t ahb_en_reg = readl(AHB_EN_REG);
+	uint32_t ahb_enabled = ahb_en_reg & BIT(4);
+	uint32_t val, pll_mode, ns_val, pll_config;
+
+	if (!ahb_enabled) {
+		dprintf(INFO, "ahb not enabled, turning on\n");
+		writel(ahb_en_reg | BIT(4), AHB_EN_REG);
+		/* Make sure iface clock is enabled before register access */
+		udelay(10);
+	}
+
+	if (hdmi_pll_on)
+		hdmi_pll_disable();
+
+	/* 1080p60/1080p50 case */
+	writel(0x2, HDMI_PHY_PLL_REFCLK_CFG);
+	writel(0x2, HDMI_PHY_PLL_CHRG_PUMP_CFG);
+	writel(0x01, HDMI_PHY_PLL_LOOP_FLT_CFG0);
+	writel(0x33, HDMI_PHY_PLL_LOOP_FLT_CFG1);
+	writel(0x2C, HDMI_PHY_PLL_IDAC_ADJ_CFG);
+	writel(0x6, HDMI_PHY_PLL_I_VI_KVCO_CFG);
+	writel(0xA, HDMI_PHY_PLL_PWRDN_B);
+	writel(0x76, HDMI_PHY_PLL_SDM_CFG0);
+	writel(0x01, HDMI_PHY_PLL_SDM_CFG1);
+	writel(0x4C, HDMI_PHY_PLL_SDM_CFG2);
+	writel(0xC0, HDMI_PHY_PLL_SDM_CFG3);
+	writel(0x00, HDMI_PHY_PLL_SDM_CFG4);
+	writel(0x9A, HDMI_PHY_PLL_SSC_CFG0);
+	writel(0x00, HDMI_PHY_PLL_SSC_CFG1);
+	writel(0x00, HDMI_PHY_PLL_SSC_CFG2);
+	writel(0x00, HDMI_PHY_PLL_SSC_CFG3);
+	writel(0x10, HDMI_PHY_PLL_LOCKDET_CFG0);
+	writel(0x1A, HDMI_PHY_PLL_LOCKDET_CFG1);
+	writel(0x0D, HDMI_PHY_PLL_LOCKDET_CFG2);
+	writel(0xe6, HDMI_PHY_PLL_VCOCAL_CFG0);
+	writel(0x02, HDMI_PHY_PLL_VCOCAL_CFG1);
+	writel(0x3B, HDMI_PHY_PLL_VCOCAL_CFG2);
+	writel(0x00, HDMI_PHY_PLL_VCOCAL_CFG3);
+	writel(0x86, HDMI_PHY_PLL_VCOCAL_CFG4);
+	writel(0x00, HDMI_PHY_PLL_VCOCAL_CFG5);
+	writel(0x33, HDMI_PHY_PLL_VCOCAL_CFG6);
+	writel(0x00, HDMI_PHY_PLL_VCOCAL_CFG7);
+
+	udelay(10);
+
+	hdmi_pll_enable();
+
+	if (!ahb_enabled)
+		writel(ahb_en_reg & ~BIT(4), AHB_EN_REG);
+
+	// set M N D
+	ns_val = readl(TV_NS_REG);
+	ns_val |= BIT(7);
+	writel(ns_val, TV_NS_REG);
+
+	writel(0x00, TV_MD_REG);
+
+	val = readl(TV_CC_REG);
+	val &= ~(BM(7, 6));
+	val |= CC(6, 0);
+	writel(val, TV_CC_REG);
+
+	ns_val &= ~BIT(7);
+	writel(ns_val, TV_NS_REG);
+
+	// confiure hdmi_ref clk to run @ 148.5 MHz
+	val = readl(MISC_CC2_REG);
+	val |= BIT(11);
+	writel(val, MISC_CC2_REG);
+
+	// Enable TV src clk
+	writel(0x03, TV_NS_REG);
+
+	// Enable hdmi clk
+	val = readl(TV_CC_REG);
+	val |= BIT(12);
+	writel(val, TV_CC_REG);
+
+	// De-Assert hdmi clk
+	val = readl(SW_RESET_CORE_REG);
+	val |= BIT(1);
+	writel(val, SW_RESET_CORE_REG);
+	udelay(10);
+	val = readl(SW_RESET_CORE_REG);
+	val &= ~(BIT(1));
+	writel(val, SW_RESET_CORE_REG);
+	udelay(10);
+
+	// Root en of tv src clk
+	val = readl(TV_CC_REG);
+	val |= BIT(2);
+	writel(val, TV_CC_REG);
+
+	// enable mdp dtv clk
+	val = readl(TV_CC_REG);
+	val |= BIT(0);
+	writel(val, TV_CC_REG);
+	udelay(10);
+
+	return 0;
+}
+
diff --git a/platform/msm8960/include/platform/clock.h b/platform/msm8960/include/platform/clock.h
index 2984484..94c4d3d 100644
--- a/platform/msm8960/include/platform/clock.h
+++ b/platform/msm8960/include/platform/clock.h
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2011-2013, 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
@@ -10,7 +10,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
@@ -29,6 +29,7 @@
 #ifndef __PLATFORM_MSM8960_CLOCK_H
 #define __PLATFORM_MSM8960_CLOCK_H
 
+#define MSM_MMSS_CLK_CTL_SIZE 4096
 #define UART_DM_CLK_RX_TX_BIT_RATE 0xFF
 
 #define REG(off)        (MSM_CLK_CTL_BASE + (off))
@@ -123,6 +124,23 @@
 #define DSI2_BYTE_CC_REG                REG_MM(0x00B4)
 #define DSI1_ESC_NS_REG                 REG_MM(0x011C)
 #define DSI1_ESC_CC_REG                 REG_MM(0x00CC)
+
+#define MM_PLL1_MODE_REG                REG_MM(0x031C)
+#define MM_PLL1_L_VAL_REG               REG_MM(0x0320)
+#define MM_PLL1_M_VAL_REG               REG_MM(0x0324)
+#define MM_PLL1_N_VAL_REG               REG_MM(0x0328)
+#define MM_PLL1_TEST_CTL_REG            REG_MM(0x0330)
+#define MM_PLL1_CONFIG_REG              REG_MM(0x032C)
+
+#define MM_PLL2_MODE_REG                REG_MM(0x3160)
+#define MM_PLL2_L_VAL_REG               REG_MM(0x3164)
+#define MM_PLL2_M_VAL_REG               REG_MM(0x3168)
+#define MM_PLL2_N_VAL_REG               REG_MM(0x316C)
+#define MM_PLL2_TEST_CTL_REG            REG_MM(0x3170)
+#define MM_PLL2_CONFIG_REG              REG_MM(0x3174)
+
+#define MMSS_AHB_EN_REG                 REG_MM(0x08)
+
 #define DSI2_ESC_NS_REG                 REG_MM(0x0150)
 #define DSI2_ESC_CC_REG                 REG_MM(0x013C)
 #define DSI_PIXEL_CC_REG                REG_MM(0x0130)
diff --git a/platform/msm8960/include/platform/gpio.h b/platform/msm8960/include/platform/gpio.h
index 7e2be7d..f4cc0c7 100644
--- a/platform/msm8960/include/platform/gpio.h
+++ b/platform/msm8960/include/platform/gpio.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011-2012, 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
@@ -9,7 +9,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/msm8960/include/platform/iomap.h b/platform/msm8960/include/platform/iomap.h
index 32167f8..9fc7e25 100644
--- a/platform/msm8960/include/platform/iomap.h
+++ b/platform/msm8960/include/platform/iomap.h
@@ -1,7 +1,7 @@
 /* Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2012, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2013, 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
@@ -66,6 +66,7 @@
 
 #define MSM_GIC_CPU_BASE    0x02002000
 #define MSM_VIC_BASE        0x02080000
+#define MSM_TCSR_SIZE       4096
 #define MSM_USB_BASE        0x12500000
 #define TLMM_BASE_ADDR      0x00800000
 
@@ -115,7 +116,31 @@
 //TODO: Where does this go?
 #define MMSS_SFPB_GPREG                       (0x05700058)
 
-#define CE1_CRYPTO4_BASE                      (0x18500000)
-#define CE3_CRYPTO4_BASE                      (0x11000000)
-#define LCDC_BASE                             (0x000C0000)
+/* HDMI base addresses */
+#define MSM_HDMI_BASE           0x04A00000
+#define DTV_BASE                0xD0000
+
+#define HDMI_USEC_REFTIMER      (MSM_HDMI_BASE + 0x0208)
+#define HDMI_CTRL               (MSM_HDMI_BASE + 0x0000)
+#define HDMI_HPD_INT_STATUS     (MSM_HDMI_BASE + 0x0250)
+#define HDMI_HPD_INT_CTRL       (MSM_HDMI_BASE + 0x0254)
+#define HDMI_HPD_CTRL           (MSM_HDMI_BASE + 0x0258)
+#define HDMI_PHY_CTRL           (MSM_HDMI_BASE + 0x000002D4)
+#define HDMI_PHY_REG_0          (MSM_HDMI_BASE + 0x00000400)
+#define HDMI_PHY_REG_1          (MSM_HDMI_BASE + 0x00000404)
+#define HDMI_PHY_REG_2          (MSM_HDMI_BASE + 0x00000408)
+#define HDMI_PHY_REG_3          (MSM_HDMI_BASE + 0x0000040c)
+#define HDMI_PHY_REG_4          (MSM_HDMI_BASE + 0x00000410)
+#define HDMI_PHY_REG_9          (MSM_HDMI_BASE + 0x00000424)
+#define HDMI_PHY_REG_11         (MSM_HDMI_BASE + 0x0000042c)
+#define HDMI_PHY_REG_12         (MSM_HDMI_BASE + 0x00000430)
+#define HDMI_TOTAL              (MSM_HDMI_BASE + 0x000002C0)
+#define HDMI_ACTIVE_HSYNC       (MSM_HDMI_BASE + 0x000002B4)
+#define HDMI_ACTIVE_VSYNC       (MSM_HDMI_BASE + 0x000002B8)
+#define HDMI_VSYNC_TOTAL_F2     (MSM_HDMI_BASE + 0x000002C4)
+#define HDMI_VSYNC_ACTIVE_F2    (MSM_HDMI_BASE + 0x000002BC)
+#define HDMI_FRAME_CTRL         (MSM_HDMI_BASE + 0x000002C8)
+#define CE1_CRYPTO4_BASE        (0x18500000)
+#define CE3_CRYPTO4_BASE        (0x11000000)
+#define LCDC_BASE               (0x000C0000)
 #endif
diff --git a/platform/msm8960/include/platform/irqs.h b/platform/msm8960/include/platform/irqs.h
index c4ed400..d43195d 100644
--- a/platform/msm8960/include/platform/irqs.h
+++ b/platform/msm8960/include/platform/irqs.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009-2011, 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 met:
@@ -7,7 +7,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/platform/msm8960/platform.c b/platform/msm8960/platform.c
index 9ad7459..158b483 100644
--- a/platform/msm8960/platform.c
+++ b/platform/msm8960/platform.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011-2012, 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
@@ -146,3 +146,23 @@
 {
 	return ticks_per_sec;
 }
+
+/* Return true if the pmic type matches */
+uint8_t platform_pmic_type(uint32_t pmic_type)
+{
+	uint8_t ret = 0;
+	uint8_t i = 0;
+	uint8_t num_ent = 0;
+	struct board_pmic_data pmic_info[SMEM_V7_SMEM_MAX_PMIC_DEVICES];
+
+	num_ent = board_pmic_info(&pmic_info, SMEM_V7_SMEM_MAX_PMIC_DEVICES);
+
+	for(i = 0; i < num_ent; i++) {
+		if (pmic_info[i].pmic_type == pmic_type) {
+			ret = 1;
+			break;
+		}
+	}
+
+	return ret;
+}
diff --git a/platform/msm8960/rules.mk b/platform/msm8960/rules.mk
index ccc6833..1950d60 100644
--- a/platform/msm8960/rules.mk
+++ b/platform/msm8960/rules.mk
@@ -20,7 +20,8 @@
 	$(LOCAL_DIR)/platform.o \
 	$(LOCAL_DIR)/acpuclock.o \
 	$(LOCAL_DIR)/gpio.o \
-	$(LOCAL_DIR)/clock.o
+	$(LOCAL_DIR)/clock.o \
+	$(LOCAL_DIR)/hdmi_core.o
 
 LINKER_SCRIPT += $(BUILDDIR)/system-onesegment.ld
 
diff --git a/platform/msm8974/include/platform/iomap.h b/platform/msm8974/include/platform/iomap.h
index 1165f03..5e91af2 100644
--- a/platform/msm8974/include/platform/iomap.h
+++ b/platform/msm8974/include/platform/iomap.h
@@ -90,13 +90,15 @@
 
 #define MSM_CE2_BAM_BASE            0xFD444000
 #define MSM_CE2_BASE                0xFD45A000
+#define USB2_PHY_SEL                0xFD4AB000
 
 #define TLMM_BASE_ADDR              0xFD510000
 #define GPIO_CONFIG_ADDR(x)         (TLMM_BASE_ADDR + 0x1000 + (x)*0x10)
 #define GPIO_IN_OUT_ADDR(x)         (TLMM_BASE_ADDR + 0x1004 + (x)*0x10)
 
-#define MPM2_MPM_CTRL_BASE          0xFC4A1000
-#define MPM2_MPM_PS_HOLD            0xFC4AB000
+#define MPM2_MPM_CTRL_BASE                   0xFC4A1000
+#define MPM2_MPM_PS_HOLD                     0xFC4AB000
+#define MPM2_MPM_SLEEP_TIMETICK_COUNT_VAL    0xFC4A3000
 
 /* CE 2 */
 #define  GCC_CE2_BCR                (CLK_CTL_BASE + 0x1080)
diff --git a/platform/msm8974/platform.c b/platform/msm8974/platform.c
index 368b590..430116b 100644
--- a/platform/msm8974/platform.c
+++ b/platform/msm8974/platform.c
@@ -69,8 +69,19 @@
 	dprintf(INFO, "platform_init()\n");
 }
 
+static void platform_print_sclk(void)
+{
+	uint32_t count;
+
+	count = readl(MPM2_MPM_SLEEP_TIMETICK_COUNT_VAL);
+
+	dprintf(INFO, "mpm sclk=(%lu)\n", count);
+}
+
 void platform_uninit(void)
 {
+	platform_print_sclk();
+
 #if DISPLAY_SPLASH_SCREEN
 	display_shutdown();
 #endif
diff --git a/platform/msm8x60/gpio.c b/platform/msm8x60/gpio.c
index fcd7fd4..2419b5f 100644
--- a/platform/msm8x60/gpio.c
+++ b/platform/msm8x60/gpio.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010-2011, 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
@@ -9,7 +9,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/msm8x60/hdmi_core.c b/platform/msm8x60/hdmi_core.c
index 1a804de..fb4da74 100644
--- a/platform/msm8x60/hdmi_core.c
+++ b/platform/msm8x60/hdmi_core.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010-2013, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
@@ -35,7 +35,25 @@
 #include <platform/scm-io.h>
 
 extern void hdmi_app_clk_init(int);
-extern void hdmi_msm_turn_on();
+extern int hdmi_msm_turn_on();
+
+#define FB_ADDR   0x43E00000
+
+static struct fbcon_config fb_cfg = {
+	.height       = DTV_FB_HEIGHT,
+	.width        = DTV_FB_WIDTH,
+	.stride       = DTV_FB_WIDTH,
+	.format       = DTV_FORMAT_RGB565,
+	.bpp          = DTV_BPP,
+	.update_start = NULL,
+	.update_done  = NULL,
+	.base         = FB_ADDR;
+};
+
+struct fbcon_config *get_fbcon(void)
+{
+	return &fb_cfg;
+}
 
 void hdmi_msm_init_phy()
 {
@@ -64,17 +82,6 @@
 	writel(0x13, HDMI_PHY_REG_12);
 }
 
-void hdmi_frame_ctrl_reg()
-{
-	uint32_t hdmi_frame_ctrl;
-
-	hdmi_frame_ctrl = ((0 << 31) & 0x80000000);
-	hdmi_frame_ctrl |= ((0 << 29) & 0x20000000);
-	hdmi_frame_ctrl |= ((0 << 28) & 0x10000000);
-	hdmi_frame_ctrl |= (1 << 12);
-	writel(hdmi_frame_ctrl, HDMI_FRAME_CTRL);
-}
-
 static void hdmi_gpio_config()
 {
 	uint32_t func;
@@ -101,7 +108,7 @@
  * This is the start function which initializes clocks , gpios for hdmi
  * & powers on the HDMI core
  */
-void hdmi_display_init()
+void hdmi_power_init()
 {
 	// Enable HDMI clocks
 	hdmi_app_clk_init(1);
@@ -117,7 +124,43 @@
 	hdmi_msm_turn_on();
 }
 
-void dtv_on()
+static void hdmi_msm_reset_core()
+{
+        uint32_t reg_val = 0;
+        hdmi_msm_set_mode(0);
+        // Disable clocks
+        hdmi_app_clk_init(0);
+        udelay(5);
+        // Enable clocks
+        hdmi_app_clk_init(1);
+
+        reg_val = secure_readl(SW_RESET_CORE_REG);
+        reg_val |= BIT(11);
+        secure_writel(reg_val, SW_RESET_CORE_REG);
+        udelay(5);
+        reg_val = secure_readl(SW_RESET_AHB_REG);
+        reg_val |= BIT(9);
+        secure_writel(reg_val, SW_RESET_AHB_REG);
+        udelay(5);
+        reg_val = secure_readl(SW_RESET_AHB_REG);
+        reg_val |= BIT(9);
+        secure_writel(reg_val, SW_RESET_AHB_REG);
+        udelay(20);
+        reg_val = secure_readl(SW_RESET_CORE_REG);
+        reg_val &= ~(BIT(11));
+        secure_writel(reg_val, SW_RESET_CORE_REG);
+        udelay(5);
+        reg_val = secure_readl(SW_RESET_AHB_REG);
+        reg_val &= ~(BIT(9));
+        secure_writel(reg_val, SW_RESET_AHB_REG);
+        udelay(5);
+        reg_val = secure_readl(SW_RESET_AHB_REG);
+        reg_val &= ~(BIT(9));
+        secure_writel(reg_val, SW_RESET_AHB_REG);
+        udelay(5);
+}
+
+int hdmi_dtv_on()
 {
 	uint32_t val, pll_mode, ns_val, pll_config;
 
@@ -201,4 +244,6 @@
 	val |= BIT(0);
 	secure_writel(val, TV_CC_REG);
 	udelay(10);
+
+	return 0;
 }
diff --git a/platform/msm8x60/include/platform/adm.h b/platform/msm8x60/include/platform/adm.h
index 05468d9..3df4675 100644
--- a/platform/msm8x60/include/platform/adm.h
+++ b/platform/msm8x60/include/platform/adm.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm8x60/include/platform/clock.h b/platform/msm8x60/include/platform/clock.h
index 4ca32c2..7fed38e 100644
--- a/platform/msm8x60/include/platform/clock.h
+++ b/platform/msm8x60/include/platform/clock.h
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2010-2012, 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
@@ -10,7 +10,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/msm8x60/include/platform/gpio.h b/platform/msm8x60/include/platform/gpio.h
index 84c8061..f66abdb 100644
--- a/platform/msm8x60/include/platform/gpio.h
+++ b/platform/msm8x60/include/platform/gpio.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -9,7 +9,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/msm8x60/include/platform/iomap.h b/platform/msm8x60/include/platform/iomap.h
index 9cb1a54..2ffaff2 100644
--- a/platform/msm8x60/include/platform/iomap.h
+++ b/platform/msm8x60/include/platform/iomap.h
@@ -1,7 +1,7 @@
 /* Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/platform/msm8x60/include/platform/irqs.h b/platform/msm8x60/include/platform/irqs.h
index a795ed4..3e40581 100644
--- a/platform/msm8x60/include/platform/irqs.h
+++ b/platform/msm8x60/include/platform/irqs.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009-2011, 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 met:
@@ -7,7 +7,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/platform/msm8x60/include/platform/machtype.h b/platform/msm8x60/include/platform/machtype.h
index 6b372e3..e3429ac 100644
--- a/platform/msm8x60/include/platform/machtype.h
+++ b/platform/msm8x60/include/platform/machtype.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
diff --git a/platform/msm8x60/include/platform/pmic_batt_alarm.h b/platform/msm8x60/include/platform/pmic_batt_alarm.h
index e711fd7..a0c0c23 100644
--- a/platform/msm8x60/include/platform/pmic_batt_alarm.h
+++ b/platform/msm8x60/include/platform/pmic_batt_alarm.h
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/msm8x60/include/platform/pmic_pwm.h b/platform/msm8x60/include/platform/pmic_pwm.h
index 04ac564..f0a47d8 100644
--- a/platform/msm8x60/include/platform/pmic_pwm.h
+++ b/platform/msm8x60/include/platform/pmic_pwm.h
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/msm8x60/include/platform/scm-io.h b/platform/msm8x60/include/platform/scm-io.h
index 78df5c9..f8c5533 100644
--- a/platform/msm8x60/include/platform/scm-io.h
+++ b/platform/msm8x60/include/platform/scm-io.h
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/msm8x60/panel_auo_wvga.c b/platform/msm8x60/panel_auo_wvga.c
index e6ad539..2e67191 100644
--- a/platform/msm8x60/panel_auo_wvga.c
+++ b/platform/msm8x60/panel_auo_wvga.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *    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 nor
+ *  * Neither the name of The Linux Foundation nor
  *    the names of its contributors may be used to endorse or promote
  *    products derived from this software without specific prior written
  *    permission.
diff --git a/platform/msm8x60/platform.c b/platform/msm8x60/platform.c
old mode 100755
new mode 100644
index 16086a9..8c31db6
--- a/platform/msm8x60/platform.c
+++ b/platform/msm8x60/platform.c
@@ -149,10 +149,13 @@
 #if DISPLAY_TYPE_HDMI
 	struct hdmi_disp_mode_timing_type *hdmi_timing;
 	mdp_clock_init();
-	hdmi_display_init();
-	hdmi_timing = hdmi_common_init_panel_info();
-	fb_cfg = hdmi_dtv_init(hdmi_timing);
+	hdmi_power_init();
+	fb_cfg = get_fbcon();
+	hdmi_set_fb_addr(fb_cfg.base);
 	fbcon_setup(fb_cfg);
+	hdmi_dtv_init();
+	hdmi_dtv_on();
+	hdmi_msm_turn_on();
 #endif
 }
 
diff --git a/platform/msm8x60/pmic_batt_alarm.c b/platform/msm8x60/pmic_batt_alarm.c
index 884d589..13f0acc 100644
--- a/platform/msm8x60/pmic_batt_alarm.c
+++ b/platform/msm8x60/pmic_batt_alarm.c
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/msm8x60/pmic_pwm.c b/platform/msm8x60/pmic_pwm.c
index 5e5cc2f..89098fb 100644
--- a/platform/msm8x60/pmic_pwm.c
+++ b/platform/msm8x60/pmic_pwm.c
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *    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
+ *  * Neither the name of The Linux Foundation nor the names of its
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
diff --git a/platform/msm8x60/scm-io.c b/platform/msm8x60/scm-io.c
index 9a1aac4..9552164 100644
--- a/platform/msm8x60/scm-io.c
+++ b/platform/msm8x60/scm-io.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -9,7 +9,7 @@
  *     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
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/adm.c b/platform/msm_shared/adm.c
index a06e77a..ea8983f 100644
--- a/platform/msm_shared/adm.c
+++ b/platform/msm_shared/adm.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/adm.h b/platform/msm_shared/adm.h
index 52f97a3..7c2fef7 100644
--- a/platform/msm_shared/adm.h
+++ b/platform/msm_shared/adm.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/board.c b/platform/msm_shared/board.c
index 220c6d3..58bf4a3 100644
--- a/platform/msm_shared/board.c
+++ b/platform/msm_shared/board.c
@@ -33,21 +33,23 @@
 #include <baseband.h>
 
 static struct board_data board = {UNKNOWN,
+	0,
 	HW_PLATFORM_UNKNOWN,
 	HW_PLATFORM_SUBTYPE_UNKNOWN,
 	LINUX_MACHTYPE_UNKNOWN,
 	BASEBAND_MSM,
-	PMIC_IS_INVALID,
-	0,
-	0};
+	{{PMIC_IS_INVALID, 0}, {PMIC_IS_INVALID, 0}, {PMIC_IS_INVALID, 0}},
+};
 
 static void platform_detect()
 {
 	struct smem_board_info_v6 board_info_v6;
 	struct smem_board_info_v7 board_info_v7;
+	struct smem_board_info_v8 board_info_v8;
 	unsigned int board_info_len = 0;
 	unsigned ret = 0;
 	unsigned format = 0;
+	uint8_t i;
 
 	ret = smem_read_alloc_entry_offset(SMEM_BOARD_INFO_LOCATION,
 						   &format, sizeof(format), 0);
@@ -83,8 +85,28 @@
 		board.platform_version = board_info_v7.board_info_v3.msm_version;
 		board.platform_hw = board_info_v7.board_info_v3.hw_platform;
 		board.platform_subtype = board_info_v7.platform_subtype;
-		board.pmic_type = board_info_v7.pmic_type;
-		board.pmic_version = board_info_v7.pmic_version;
+		board.pmic_info[0].pmic_type = board_info_v7.pmic_type;
+		board.pmic_info[0].pmic_version = board_info_v7.pmic_version;
+	}
+	else if (format == 8)
+	{
+		board_info_len = sizeof(board_info_v8);
+
+		ret = smem_read_alloc_entry(SMEM_BOARD_INFO_LOCATION,
+				&board_info_v8,
+				board_info_len);
+		if (ret)
+			return;
+
+		board.platform = board_info_v8.board_info_v3.msm_id;
+		board.platform_version = board_info_v8.board_info_v3.msm_version;
+		board.platform_hw = board_info_v8.board_info_v3.hw_platform;
+		board.platform_subtype = board_info_v8.platform_subtype;
+
+		for (i = 0; i < SMEM_V8_SMEM_MAX_PMIC_DEVICES; i++) {
+			board.pmic_info[i].pmic_type = board_info_v8.pmic_info[i].pmic_type;
+			board.pmic_info[i].pmic_version = board_info_v8.pmic_info[i].pmic_version;
+		}
 	}
 	else
 	{
@@ -120,14 +142,17 @@
 	return board.platform_hw;
 }
 
-uint32_t board_pmic_type()
+uint8_t board_pmic_info(struct board_pmic_data *info, uint8_t num_ent)
 {
-	return board.pmic_type;
-}
+	uint8_t i;
 
-uint32_t board_pmic_ver()
-{
-	return board.pmic_version;
+	for (i = 0; i < num_ent && i < SMEM_MAX_PMIC_DEVICES; i++) {
+		info->pmic_type = board.pmic_info[i].pmic_type;
+		info->pmic_version = board.pmic_info[i].pmic_version;
+		info++;
+	}
+
+	return (i--);
 }
 
 uint32_t board_soc_version()
diff --git a/platform/msm_shared/certificate.c b/platform/msm_shared/certificate.c
index 4a5b1a0..a76a2e1 100644
--- a/platform/msm_shared/certificate.c
+++ b/platform/msm_shared/certificate.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/clock-local.c b/platform/msm_shared/clock-local.c
index 07ccb47..f996214 100644
--- a/platform/msm_shared/clock-local.c
+++ b/platform/msm_shared/clock-local.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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 met:
@@ -8,7 +8,7 @@
  *   * 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 nor
+ *   * Neither the name of The Linux Foundation nor
  *     the names of its contributors may be used to endorse or promote
  *     products derived from this software without specific prior written
  *     permission.
diff --git a/platform/msm_shared/clock.c b/platform/msm_shared/clock.c
index aa66499..d69f2c7 100644
--- a/platform/msm_shared/clock.c
+++ b/platform/msm_shared/clock.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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 met:
@@ -8,7 +8,7 @@
  *   * 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 nor
+ *   * Neither the name of The Linux Foundation nor
  *     the names of its contributors may be used to endorse or promote
  *     products derived from this software without specific prior written
  *     permission.
diff --git a/platform/msm_shared/clock_lib2.c b/platform/msm_shared/clock_lib2.c
index 645755c..218b585 100644
--- a/platform/msm_shared/clock_lib2.c
+++ b/platform/msm_shared/clock_lib2.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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 met:
@@ -8,7 +8,7 @@
  *   * 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 nor
+ *   * Neither the name of The Linux Foundation nor
  *     the names of its contributors may be used to endorse or promote
  *     products derived from this software without specific prior written
  *     permission.
diff --git a/platform/msm_shared/clock_pll.c b/platform/msm_shared/clock_pll.c
index 9613cd9..6064a8e 100644
--- a/platform/msm_shared/clock_pll.c
+++ b/platform/msm_shared/clock_pll.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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 met:
@@ -8,7 +8,7 @@
  *   * 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 nor
+ *   * Neither the name of The Linux Foundation nor
  *     the names of its contributors may be used to endorse or promote
  *     products derived from this software without specific prior written
  *     permission.
diff --git a/platform/msm_shared/debug.c b/platform/msm_shared/debug.c
index 3370fe3..8adb6ce 100644
--- a/platform/msm_shared/debug.c
+++ b/platform/msm_shared/debug.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009, 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
diff --git a/platform/msm_shared/dev_tree.c b/platform/msm_shared/dev_tree.c
index 04caeb1..6a06a12 100644
--- a/platform/msm_shared/dev_tree.c
+++ b/platform/msm_shared/dev_tree.c
@@ -39,6 +39,28 @@
 extern int target_is_emmc_boot(void);
 extern uint32_t target_dev_tree_mem(void *fdt, uint32_t memory_node_offset);
 
+/*
+ * Argument:     Start address of the kernel loaded in RAM
+ * Return Value: DTB address : If appended device tree is found
+ *               '0'         : Otherwise
+ */
+uint32_t dev_tree_appended(void *kernel)
+{
+	uint32_t app_dtb_offset = 0;
+	uint32_t dtb_magic = 0;
+	uint32_t dtb = 0;
+
+	memcpy((void*) &app_dtb_offset, (void*) (kernel + DTB_OFFSET), sizeof(uint32_t));
+	memcpy((void*) &dtb_magic, (void*) (kernel + app_dtb_offset), sizeof(uint32_t));
+
+	if (dtb_magic == DTB_MAGIC) {
+		dprintf(INFO, "Found Appeneded Flattened Device tree\n");
+		dtb = (uint32_t) (kernel + app_dtb_offset);
+	}
+
+	return dtb;
+}
+
 /* Function to return the pointer to the start of the correct device tree
  *  based on the platform data.
  */
diff --git a/platform/msm_shared/display.c b/platform/msm_shared/display.c
index c005bc9..bd06767 100644
--- a/platform/msm_shared/display.c
+++ b/platform/msm_shared/display.c
@@ -32,6 +32,23 @@
 #include <mdp4.h>
 #include <mipi_dsi.h>
 
+#ifndef DISPLAY_TYPE_HDMI
+static int hdmi_dtv_init(void)
+{
+        return 0;
+}
+
+static int hdmi_dtv_on(void)
+{
+        return 0;
+}
+
+static int hdmi_msm_turn_on(void)
+{
+        return 0;
+}
+#endif
+
 static struct msm_fb_panel_data *panel;
 
 extern int lvds_on(struct msm_fb_panel_data *pdata);
@@ -105,6 +122,12 @@
 		if (ret)
 			goto msm_display_config_out;
 		break;
+	case HDMI_PANEL:
+		dprintf(INFO, "Config HDMI PANEL.\n");
+		ret = hdmi_dtv_init();
+		if (ret)
+			goto msm_display_config_out;
+		break;
 	default:
 		return ERR_INVALID_ARGS;
 	};
@@ -160,6 +183,17 @@
 		if (ret)
 			goto msm_display_on_out;
 		break;
+	case HDMI_PANEL:
+		dprintf(INFO, "Turn on HDMI PANEL.\n");
+		ret = hdmi_dtv_on();
+		if (ret)
+			goto msm_display_on_out;
+
+		ret = hdmi_msm_turn_on();
+		if (ret)
+			goto msm_display_on_out;
+		break;
+
 	default:
 		return ERR_INVALID_ARGS;
 	};
@@ -254,6 +288,11 @@
 		return ERR_INVALID_ARGS;
 	};
 
+	if (target_cont_splash_screen()) {
+		dprintf(INFO, "Continuous splash enabled, keeping panel alive.\n");
+		return NO_ERROR;
+	}
+
 	if (pinfo->off)
 		ret = pinfo->off();
 
diff --git a/platform/msm_shared/hdmi.c b/platform/msm_shared/hdmi.c
index 3bb1a26..422a506 100644
--- a/platform/msm_shared/hdmi.c
+++ b/platform/msm_shared/hdmi.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010-2013, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
@@ -27,27 +27,59 @@
  *
  */
 #include <hdmi.h>
+#include <msm_panel.h>
 #include <platform/timer.h>
 #include <platform/clock.h>
 #include <platform/iomap.h>
-#include <platform/scm-io.h>
 
 #define MDP4_OVERLAYPROC1_BASE  0x18000
 #define MDP4_RGB_BASE           0x40000
 #define MDP4_RGB_OFF            0x10000
 
 struct hdmi_disp_mode_timing_type hdmi_timing_default = {
-	.height = 1080,
+	.height         = 1080,
 	.hsync_porch_fp = 88,
-	.hsync_width = 44,
+	.hsync_width    = 44,
 	.hsync_porch_bp = 148,
-	.width = 1920,
+	.width          = 1920,
 	.vsync_porch_fp = 4,
-	.vsync_width = 5,
+	.vsync_width    = 5,
 	.vsync_porch_bp = 36,
+	.bpp            = 24,
 };
 
-static void hdmi_msm_set_mode(int on)
+static uint8_t hdmi_msm_avi_iframe_lut[][16] = {
+/*	480p60	480i60	576p50	576i50	720p60	 720p50	1080p60	1080i60	1080p50
+	1080i50	1080p24	1080p30	1080p25	640x480p 480p60_16_9 576p50_4_3 */
+	{0x10,	0x10,	0x10,	0x10,	0x10,	 0x10,	0x10,	0x10,	0x10,
+	 0x10,	0x10,	0x10,	0x10,	0x10, 0x10, 0x10}, /*00*/
+	{0x18,	0x18,	0x28,	0x28,	0x28,	 0x28,	0x28,	0x28,	0x28,
+	 0x28,	0x28,	0x28,	0x28,	0x18, 0x28, 0x18}, /*01*/
+	{0x00,	0x04,	0x04,	0x04,	0x04,	 0x04,	0x04,	0x04,	0x04,
+	 0x04,	0x04,	0x04,	0x04,	0x88, 0x00, 0x04}, /*02*/
+	{0x02,	0x06,	0x11,	0x15,	0x04,	 0x13,	0x10,	0x05,	0x1F,
+	 0x14,	0x20,	0x22,	0x21,	0x01, 0x03, 0x11}, /*03*/
+	{0x00,	0x01,	0x00,	0x01,	0x00,	 0x00,	0x00,	0x00,	0x00,
+	 0x00,	0x00,	0x00,	0x00,	0x00, 0x00, 0x00}, /*04*/
+	{0x00,	0x00,	0x00,	0x00,	0x00,	 0x00,	0x00,	0x00,	0x00,
+	 0x00,	0x00,	0x00,	0x00,	0x00, 0x00, 0x00}, /*05*/
+	{0x00,	0x00,	0x00,	0x00,	0x00,	 0x00,	0x00,	0x00,	0x00,
+	 0x00,	0x00,	0x00,	0x00,	0x00, 0x00, 0x00}, /*06*/
+	{0xE1,	0xE1,	0x41,	0x41,	0xD1,	 0xd1,	0x39,	0x39,	0x39,
+	 0x39,	0x39,	0x39,	0x39,	0xe1, 0xE1, 0x41}, /*07*/
+	{0x01,	0x01,	0x02,	0x02,	0x02,	 0x02,	0x04,	0x04,	0x04,
+	 0x04,	0x04,	0x04,	0x04,	0x01, 0x01, 0x02}, /*08*/
+	{0x00,	0x00,	0x00,	0x00,	0x00,	 0x00,	0x00,	0x00,	0x00,
+	 0x00,	0x00,	0x00,	0x00,	0x00, 0x00, 0x00}, /*09*/
+	{0x00,	0x00,	0x00,	0x00,	0x00,	 0x00,	0x00,	0x00,	0x00,
+	 0x00,	0x00,	0x00,	0x00,	0x00, 0x00, 0x00}, /*10*/
+	{0xD1,	0xD1,	0xD1,	0xD1,	0x01,	 0x01,	0x81,	0x81,	0x81,
+	 0x81,	0x81,	0x81,	0x81,	0x81, 0xD1, 0xD1}, /*11*/
+	{0x02,	0x02,	0x02,	0x02,	0x05,	 0x05,	0x07,	0x07,	0x07,
+	 0x07,	0x07,	0x07,	0x07,	0x02, 0x02, 0x02}  /*12*/
+};
+
+void hdmi_msm_set_mode(int on)
 {
 	uint32_t val = 0;
 	if (on) {
@@ -64,6 +96,39 @@
 	return &hdmi_timing_default;
 }
 
+void hdmi_set_fb_addr(void *addr)
+{
+	hdmi_timing_default.base = addr;
+}
+
+void hdmi_msm_panel_init(struct msm_panel_info *pinfo)
+{
+	if (!pinfo)
+		return;
+
+	pinfo->xres = hdmi_timing_default.width;
+	pinfo->yres = hdmi_timing_default.height;
+	pinfo->bpp  = hdmi_timing_default.bpp;
+	pinfo->type = HDMI_PANEL;
+
+	pinfo->hdmi.h_back_porch  = hdmi_timing_default.hsync_porch_bp;
+	pinfo->hdmi.h_front_porch = hdmi_timing_default.hsync_porch_fp;
+	pinfo->hdmi.h_pulse_width = hdmi_timing_default.hsync_width;
+	pinfo->hdmi.v_back_porch  = hdmi_timing_default.vsync_porch_bp;
+	pinfo->hdmi.v_front_porch = hdmi_timing_default.vsync_porch_fp;
+	pinfo->hdmi.v_pulse_width = hdmi_timing_default.vsync_width;
+}
+
+void hdmi_frame_ctrl_reg()
+{
+	uint32_t hdmi_frame_ctrl;
+
+	hdmi_frame_ctrl  = ((0 << 31) & 0x80000000);
+	hdmi_frame_ctrl |= ((0 << 29) & 0x20000000);
+	hdmi_frame_ctrl |= ((0 << 28) & 0x10000000);
+	writel(hdmi_frame_ctrl, HDMI_FRAME_CTRL);
+}
+
 void hdmi_video_setup()
 {
 	uint32_t hsync_total = 0;
@@ -107,96 +172,153 @@
 	hdmi_frame_ctrl_reg();
 }
 
+void hdmi_msm_avi_info_frame(void)
+{
+	/* two header + length + 13 data */
+	uint8_t  aviInfoFrame[16];
+	uint8_t  checksum;
+	uint32_t sum;
+	uint32_t regVal;
+	uint8_t  i;
+	uint8_t  mode = 6; //HDMI_VFRMT_1920x1080p60_16_9
+
+	/* InfoFrame Type = 82 */
+	aviInfoFrame[0]  = 0x82;
+	/* Version = 2 */
+	aviInfoFrame[1]  = 2;
+	/* Length of AVI InfoFrame = 13 */
+	aviInfoFrame[2]  = 13;
+
+	/* Data Byte 01: 0 Y1 Y0 A0 B1 B0 S1 S0 */
+	aviInfoFrame[3]  = hdmi_msm_avi_iframe_lut[0][mode];
+
+	/* Setting underscan bit */
+	aviInfoFrame[3] |= 0x02;
+
+	/* Data Byte 02: C1 C0 M1 M0 R3 R2 R1 R0 */
+	aviInfoFrame[4]  = hdmi_msm_avi_iframe_lut[1][mode];
+	/* Data Byte 03: ITC EC2 EC1 EC0 Q1 Q0 SC1 SC0 */
+	aviInfoFrame[5]  = hdmi_msm_avi_iframe_lut[2][mode];
+	/* Data Byte 04: 0 VIC6 VIC5 VIC4 VIC3 VIC2 VIC1 VIC0 */
+	aviInfoFrame[6]  = hdmi_msm_avi_iframe_lut[3][mode];
+	/* Data Byte 05: 0 0 0 0 PR3 PR2 PR1 PR0 */
+	aviInfoFrame[7]  = hdmi_msm_avi_iframe_lut[4][mode];
+	/* Data Byte 06: LSB Line No of End of Top Bar */
+	aviInfoFrame[8]  = hdmi_msm_avi_iframe_lut[5][mode];
+	/* Data Byte 07: MSB Line No of End of Top Bar */
+	aviInfoFrame[9]  = hdmi_msm_avi_iframe_lut[6][mode];
+	/* Data Byte 08: LSB Line No of Start of Bottom Bar */
+	aviInfoFrame[10] = hdmi_msm_avi_iframe_lut[7][mode];
+	/* Data Byte 09: MSB Line No of Start of Bottom Bar */
+	aviInfoFrame[11] = hdmi_msm_avi_iframe_lut[8][mode];
+	/* Data Byte 10: LSB Pixel Number of End of Left Bar */
+	aviInfoFrame[12] = hdmi_msm_avi_iframe_lut[9][mode];
+	/* Data Byte 11: MSB Pixel Number of End of Left Bar */
+	aviInfoFrame[13] = hdmi_msm_avi_iframe_lut[10][mode];
+	/* Data Byte 12: LSB Pixel Number of Start of Right Bar */
+	aviInfoFrame[14] = hdmi_msm_avi_iframe_lut[11][mode];
+	/* Data Byte 13: MSB Pixel Number of Start of Right Bar */
+	aviInfoFrame[15] = hdmi_msm_avi_iframe_lut[12][mode];
+
+	sum = 0;
+	for (i = 0; i < 16; i++)
+		sum += aviInfoFrame[i];
+	sum &= 0xFF;
+	sum = 256 - sum;
+	checksum = (uint8_t) sum;
+
+	regVal = aviInfoFrame[5];
+	regVal = regVal << 8 | aviInfoFrame[4];
+	regVal = regVal << 8 | aviInfoFrame[3];
+	regVal = regVal << 8 | checksum;
+	writel(regVal, MSM_HDMI_BASE + 0x006C);
+
+	regVal = aviInfoFrame[9];
+	regVal = regVal << 8 | aviInfoFrame[8];
+	regVal = regVal << 8 | aviInfoFrame[7];
+	regVal = regVal << 8 | aviInfoFrame[6];
+	writel(regVal, MSM_HDMI_BASE + 0x0070);
+
+	regVal = aviInfoFrame[13];
+	regVal = regVal << 8 | aviInfoFrame[12];
+	regVal = regVal << 8 | aviInfoFrame[11];
+	regVal = regVal << 8 | aviInfoFrame[10];
+	writel(regVal, MSM_HDMI_BASE + 0x0074);
+
+	regVal = aviInfoFrame[1];
+	regVal = regVal << 16 | aviInfoFrame[15];
+	regVal = regVal << 8 | aviInfoFrame[14];
+	writel(regVal, MSM_HDMI_BASE + 0x0078);
+
+	/* INFOFRAME_CTRL0[0x002C] */
+	/* 0x3 for AVI InfFrame enable (every frame) */
+	writel(readl(0x002C) | 0x00000003L, MSM_HDMI_BASE + 0x002C);
+}
+
 void hdmi_app_clk_init(int on)
 {
 	uint32_t val = 0;
 	if (on) {
-		// Enable clocks
-		val = secure_readl(MISC_CC2_REG);
-		val |= BIT(11);
-		secure_writel(val, MISC_CC2_REG);
+		/* Enable hdmi apps clock */
+		val = readl(MISC_CC2_REG);
+		val = BIT(11);
+		writel(val, MISC_CC2_REG);
 		udelay(10);
-		val = secure_readl(MMSS_AHB_EN_REG);
+
+		/* Enable hdmi master clock */
+		val = readl(MMSS_AHB_EN_REG);
 		val |= BIT(14);
-		secure_writel(val, MMSS_AHB_EN_REG);
+		writel(val, MMSS_AHB_EN_REG);
 		udelay(10);
-		val = secure_readl(MMSS_AHB_EN_REG);
+
+		/* Enable hdmi slave clock */
+		val = readl(MMSS_AHB_EN_REG);
 		val |= BIT(4);
-		secure_writel(val, MMSS_AHB_EN_REG);
+		writel(val, MMSS_AHB_EN_REG);
 		udelay(10);
 	} else {
 		// Disable clocks
-		val = secure_readl(MISC_CC2_REG);
+		val = readl(MISC_CC2_REG);
 		val &= ~(BIT(11));
-		secure_writel(val, MISC_CC2_REG);
+		writel(val, MISC_CC2_REG);
 		udelay(10);
-		val = secure_readl(MMSS_AHB_EN_REG);
+		val = readl(MMSS_AHB_EN_REG);
 		val &= ~(BIT(14));
-		secure_writel(val, MMSS_AHB_EN_REG);
+		writel(val, MMSS_AHB_EN_REG);
 		udelay(10);
-		val = secure_readl(MMSS_AHB_EN_REG);
+		val = readl(MMSS_AHB_EN_REG);
 		val &= ~(BIT(4));
-		secure_writel(val, MMSS_AHB_EN_REG);
+		writel(val, MMSS_AHB_EN_REG);
 		udelay(10);
 	}
 }
 
-static void hdmi_msm_reset_core()
-{
-	uint32_t reg_val = 0;
-	hdmi_msm_set_mode(0);
-	// Disable clocks
-	hdmi_app_clk_init(0);
-	udelay(5);
-	// Enable clocks
-	hdmi_app_clk_init(1);
-
-	reg_val = secure_readl(SW_RESET_CORE_REG);
-	reg_val |= BIT(11);
-	secure_writel(reg_val, SW_RESET_CORE_REG);
-	udelay(5);
-	reg_val = secure_readl(SW_RESET_AHB_REG);
-	reg_val |= BIT(9);
-	secure_writel(reg_val, SW_RESET_AHB_REG);
-	udelay(5);
-	reg_val = secure_readl(SW_RESET_AHB_REG);
-	reg_val |= BIT(9);
-	secure_writel(reg_val, SW_RESET_AHB_REG);
-	udelay(20);
-	reg_val = secure_readl(SW_RESET_CORE_REG);
-	reg_val &= ~(BIT(11));
-	secure_writel(reg_val, SW_RESET_CORE_REG);
-	udelay(5);
-	reg_val = secure_readl(SW_RESET_AHB_REG);
-	reg_val &= ~(BIT(9));
-	secure_writel(reg_val, SW_RESET_AHB_REG);
-	udelay(5);
-	reg_val = secure_readl(SW_RESET_AHB_REG);
-	reg_val &= ~(BIT(9));
-	secure_writel(reg_val, SW_RESET_AHB_REG);
-	udelay(5);
-}
-
-void hdmi_msm_turn_on(void)
+int hdmi_msm_turn_on(void)
 {
 	uint32_t hotplug_control;
+
+	hdmi_msm_set_mode(0);
+
 	hdmi_msm_reset_core();	// Reset the core
 	hdmi_msm_init_phy();
+
 	// Enable USEC REF timer
 	writel(0x0001001B, HDMI_USEC_REFTIMER);
-	// Video setup for HDMI
-	hdmi_video_setup();
+
 	// Write 1 to HDMI_CTRL to enable HDMI
 	hdmi_msm_set_mode(1);
-	dprintf(SPEW, "HDMI Core is: %s\n",
-		(readl(HDMI_CTRL) & 0x00000001) ? "on" : "off");
+
+	// Video setup for HDMI
+	hdmi_video_setup();
+
+	// AVI info setup
+	hdmi_msm_avi_info_frame();
+
+	return 0;
 }
 
-struct fbcon_config *hdmi_dtv_init(struct hdmi_disp_mode_timing_type *timing)
+int hdmi_dtv_init()
 {
-	uint32_t dtv_width;
-	uint32_t dtv_height;
-	uint32_t dtv_bpp;
 	uint32_t hsync_period;
 	uint32_t hsync_ctrl;
 	uint32_t hsync_start_x;
@@ -219,21 +341,13 @@
 	unsigned char *overlay_base;
 	uint32_t val;
 
-	dprintf(SPEW, "In DTV on function\n");
-
-	// Turn on all the clocks
-	dtv_on();
-
-	dtv_width = timing->width;
-	dtv_height = timing->height;
-	dtv_bpp = fb_cfg.bpp;
-	fb_cfg.base = FB_ADDR;
+	struct hdmi_disp_mode_timing_type *timing =
+			hdmi_common_init_panel_info();
 
 	// MDP E config
-	writel((unsigned)fb_cfg.base, MDP_BASE + 0xb0008);	//FB Address
-
-	writel(((fb_cfg.height << 16) | fb_cfg.width), MDP_BASE + 0xb0004);
-	writel((fb_cfg.width * fb_cfg.bpp / 8), MDP_BASE + 0xb000c);
+	writel((unsigned)timing->base, MDP_BASE + 0xb0008);	//FB Address
+	writel(((timing->height << 16) | timing->width), MDP_BASE + 0xb0004);
+	writel((timing->width * timing->bpp / 8), MDP_BASE + 0xb000c);
 	writel(0, MDP_BASE + 0xb0010);
 
 	writel(DMA_PACK_PATTERN_RGB | DMA_DSTC0G_8BITS | DMA_DSTC1B_8BITS |
@@ -247,11 +361,11 @@
 	rgb_base += (MDP4_RGB_OFF * 1);
 	writel(((timing->height << 16) | timing->width), rgb_base + 0x0000);
 	writel(0x0, rgb_base + 0x0004);
-	writel(0x0, rgb_base + 0x0008);
+	writel(((timing->height << 16) | timing->width), rgb_base + 0x0008);
 	writel(0x0, rgb_base + 0x000c);
-	writel(fb_cfg.base, rgb_base + 0x0010);	//FB address
-	writel((fb_cfg.width * fb_cfg.bpp / 8), rgb_base + 0x0040);
-	writel(0x24216, rgb_base + 0x0050);	//format
+	writel(timing->base, rgb_base + 0x0010);	//FB address
+	writel((timing->width * timing->bpp / 8), rgb_base + 0x0040);
+	writel(0x2443F, rgb_base + 0x0050);	//format
 	writel(0x20001, rgb_base + 0x0054);	//pattern
 	writel(0x0, rgb_base + 0x0058);
 	writel(0x20000000, rgb_base + 0x005c);	//phaseX
@@ -271,19 +385,20 @@
 
 	// Overlay cfg
 	overlay_base = MDP_BASE + MDP4_OVERLAYPROC1_BASE;
+
 	writel(0x0, MDP_BASE + 0x0038);	//EXternal interface select
 
 	data = ((timing->height << 16) | timing->width);
 	writel(data, overlay_base + 0x0008);
-	writel(fb_cfg.base, overlay_base + 0x000c);
-	writel((fb_cfg.width * fb_cfg.bpp / 8), overlay_base + 0x0010);
+	writel(timing->base, overlay_base + 0x000c);
+	writel((timing->width * timing->bpp / 8), overlay_base + 0x0010);
 	writel(0x10, overlay_base + 0x104);
 	writel(0x10, overlay_base + 0x124);
 	writel(0x10, overlay_base + 0x144);
-	writel(0x1, overlay_base + 0x0004);	/* directout */
+	writel(0x01, overlay_base + 0x0004);	/* directout */
 
 	hsync_period =
-	    timing->hsync_width + timing->hsync_porch_bp + dtv_width +
+	    timing->hsync_width + timing->hsync_porch_bp + timing->width +
 	    timing->hsync_porch_fp;
 	hsync_ctrl = (hsync_period << 16) | timing->hsync_width;
 	hsync_start_x = timing->hsync_width + timing->hsync_porch_bp;
@@ -291,7 +406,7 @@
 	display_hctl = (hsync_end_x << 16) | hsync_start_x;
 
 	vsync_period =
-	    (timing->vsync_width + timing->vsync_porch_bp + dtv_height +
+	    (timing->vsync_width + timing->vsync_porch_bp + timing->height +
 	     timing->vsync_porch_fp) * hsync_period;
 	display_v_start =
 	    (timing->vsync_width + timing->vsync_porch_bp) * hsync_period;
@@ -299,42 +414,36 @@
 	    vsync_period - (timing->vsync_porch_bp * hsync_period) - 1;
 
 	dtv_underflow_clr |= 0x80000000;
-	hsync_polarity = 0;
-	vsync_polarity = 0;
-	data_en_polarity = 0;
-	ctrl_polarity =
+	hsync_polarity     = 0;
+	vsync_polarity     = 0;
+	data_en_polarity   = 0;
+	ctrl_polarity      =
 	    (data_en_polarity << 2) | (vsync_polarity << 1) | (hsync_polarity);
 
-	writel(hsync_ctrl, MDP_BASE + DTV_BASE + 0x4);
-	writel(vsync_period, MDP_BASE + DTV_BASE + 0x8);
-	writel(timing->vsync_width * hsync_period, MDP_BASE + DTV_BASE + 0xc);
-	writel(display_hctl, MDP_BASE + DTV_BASE + 0x18);
+	writel(hsync_ctrl,      MDP_BASE + DTV_BASE + 0x4);
+	writel(vsync_period,    MDP_BASE + DTV_BASE + 0x8);
+	writel(timing->vsync_width * hsync_period,
+	                        MDP_BASE + DTV_BASE + 0xc);
+	writel(display_hctl,    MDP_BASE + DTV_BASE + 0x18);
 	writel(display_v_start, MDP_BASE + DTV_BASE + 0x1c);
-	writel(0x25a197, MDP_BASE + DTV_BASE + 0x20);
-	writel(dtv_border_clr, MDP_BASE + DTV_BASE + 0x40);
-	writel(0x8fffffff, MDP_BASE + DTV_BASE + 0x44);
-	writel(dtv_hsync_skew, MDP_BASE + DTV_BASE + 0x48);
-	writel(ctrl_polarity, MDP_BASE + DTV_BASE + 0x50);
-	writel(0, MDP_BASE + DTV_BASE + 0x2c);
-	writel(active_v_start, MDP_BASE + DTV_BASE + 0x30);
-	writel(active_v_end, MDP_BASE + DTV_BASE + 0x38);
+	writel(0x25a197,        MDP_BASE + DTV_BASE + 0x20);
+	writel(dtv_border_clr,  MDP_BASE + DTV_BASE + 0x40);
+	writel(0x8fffffff,      MDP_BASE + DTV_BASE + 0x44);
+	writel(dtv_hsync_skew,  MDP_BASE + DTV_BASE + 0x48);
+	writel(ctrl_polarity,   MDP_BASE + DTV_BASE + 0x50);
+	writel(0x0,             MDP_BASE + DTV_BASE + 0x2c);
+	writel(active_v_start,  MDP_BASE + DTV_BASE + 0x30);
+	writel(active_v_end,    MDP_BASE + DTV_BASE + 0x38);
 
-	/*
-	 * Keep Display solid color, for future debugging
-	 */
-# if 0
-	writel(0xffffffff, 0x05151008);
-	val = readl(MDP_BASE + 0x50050);
-	val |= BIT(22);
-	writel(val, MDP_BASE + 0x50050);
-	writel(BIT(5), MDP_BASE + 0x18000);
-#endif
 	/* Enable DTV block */
-	writel(0x1, MDP_BASE + DTV_BASE);
+	writel(0x01, MDP_BASE + DTV_BASE);
+
+	/* Flush mixer/pipes configurations */
 	val = BIT(1);
 	val |= BIT(5);
 	writel(val, MDP_BASE + 0x18000);
-	return &fb_cfg;
+
+	return 0;
 }
 
 void hdmi_display_shutdown()
diff --git a/platform/msm_shared/hsusb.c b/platform/msm_shared/hsusb.c
index bfceeff..e5bd7b5 100644
--- a/platform/msm_shared/hsusb.c
+++ b/platform/msm_shared/hsusb.c
@@ -666,11 +666,6 @@
 
 	hsusb_clock_init();
 
-	/* Do any target specific intialization like GPIO settings,
-	 * LDO, PHY configuration etc. needed before USB port can be used.
-	 */
-	target_usb_init();
-
 	/* RESET */
 	writel(0x00080000, USB_USBCMD);
 
@@ -681,7 +676,12 @@
 	/* select ULPI phy */
 	writel(0x80000000, USB_PORTSC);
 
-	   /* USB_OTG_HS_AHB_BURST */
+	/* Do any target specific intialization like GPIO settings,
+	 * LDO, PHY configuration etc. needed before USB port can be used.
+	 */
+	target_usb_init();
+
+	/* USB_OTG_HS_AHB_BURST */
 	writel(0x0, USB_SBUSCFG);
 
 	/* USB_OTG_HS_AHB_MODE: HPROT_MODE */
@@ -858,6 +858,7 @@
 	struct udc_descriptor *desc;
 	unsigned char *data;
 	unsigned size;
+	uint32_t val;
 
 	dprintf(ALWAYS, "udc_start()\n");
 
@@ -908,7 +909,9 @@
 	unmask_interrupt(INT_USB_HS);
 
 	/* go to RUN mode (D+ pullup enable) */
-	writel(0x00080001, USB_USBCMD);
+	val = readl(USB_USBCMD);
+
+	writel(val | 0x00080001, USB_USBCMD);
 
 	return 0;
 }
diff --git a/platform/msm_shared/hsusb.h b/platform/msm_shared/hsusb.h
index 79b0a51..f914ec6 100644
--- a/platform/msm_shared/hsusb.h
+++ b/platform/msm_shared/hsusb.h
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2013, 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
@@ -11,7 +11,7 @@
  *    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 
+ *    the documentation and/or other materials provided with the
  *    distribution.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -21,7 +21,7 @@
  * 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 
+ * 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
@@ -44,6 +44,8 @@
 #define USB_SBUSCFG          (MSM_USB_BASE + 0x0090)
 #define USB_AHB_MODE         (MSM_USB_BASE + 0x0098)
 
+#define USB_GENCONFIG_2      (MSM_USB_BASE + 0x00A0)
+
 #define USB_CAPLENGTH        (MSM_USB_BASE + 0x0100)	/* 8 bit */
 #define USB_HCIVERSION       (MSM_USB_BASE + 0x0102)	/* 16 bit */
 #define USB_HCSPARAMS        (MSM_USB_BASE + 0x0104)
@@ -69,6 +71,13 @@
 #define USB_ENDPTSTAT        (MSM_USB_BASE + 0x01B8)
 #define USB_ENDPTCOMPLETE    (MSM_USB_BASE + 0x01BC)
 #define USB_ENDPTCTRL(n)     (MSM_USB_BASE + 0x01C0 + (4 * (n)))
+#define USB_OTG_HS_PHY_CTRL  (MSM_USB_BASE + 0x0240)
+#define USB_OTG_HS_PHY_SEC_CTRL (MSM_USB_BASE + 0x0278)
+
+/* ULPI registers */
+#define ULPI_MISC_A_READ         0x96
+#define ULPI_MISC_A_SET          0x97
+#define ULPI_MISC_A_CLEAR        0x98
 
 #define USBCMD_RESET   2
 #define USBCMD_ATTACH  1
@@ -155,6 +164,11 @@
 #define CTRL_RXT_BULK         (2 << 2)
 #define CTRL_RXT_INT          (3 << 2)
 
+#define GEN2_SESS_VLD_CTRL_EN (1 << 7)
+#define SESS_VLD_CTRL         (1 << 25)
+
+
+/* ULPI bit map */
 #define ULPI_WAKEUP           (1 << 31)
 #define ULPI_RUN              (1 << 30)
 #define ULPI_WRITE            (1 << 29)
@@ -164,4 +178,7 @@
 #define ULPI_DATA(n)          ((n) & 255)
 #define ULPI_DATA_READ(n)     (((n) >> 8) & 255)
 
+#define ULPI_MISC_A_VBUSVLDEXTSEL    (1 << 1)
+#define ULPI_MISC_A_VBUSVLDEXT       (1 << 0)
+
 #endif
diff --git a/platform/msm_shared/image_verify.c b/platform/msm_shared/image_verify.c
index 2b45d4c..068f188 100644
--- a/platform/msm_shared/image_verify.c
+++ b/platform/msm_shared/image_verify.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
diff --git a/platform/msm_shared/include/board.h b/platform/msm_shared/include/board.h
index 7ede8ee..f863a26 100644
--- a/platform/msm_shared/include/board.h
+++ b/platform/msm_shared/include/board.h
@@ -30,8 +30,16 @@
 #ifndef __BOARD_H
 #define __BOARD_H
 
+#include <smem.h>
+
 #define LINUX_MACHTYPE_UNKNOWN 0
 #define BOARD_SOC_VERSION2     0x20000
+#define MAX_PMIC_DEVICES       SMEM_MAX_PMIC_DEVICES
+
+struct board_pmic_data {
+	uint32_t pmic_type;
+	uint32_t pmic_version;
+};
 
 struct board_data {
 	uint32_t platform;
@@ -40,8 +48,7 @@
 	uint32_t platform_subtype;
 	uint32_t target;
 	uint32_t baseband;
-	uint32_t pmic_type;
-	uint32_t pmic_version;
+	struct board_pmic_data pmic_info[MAX_PMIC_DEVICES];
 };
 
 void board_init();
@@ -51,8 +58,7 @@
 uint32_t board_target_id();
 uint32_t board_baseband();
 uint32_t board_hardware_id();
-uint32_t board_pmic_type();
-uint32_t board_pmic_ver();
+uint8_t board_pmic_info(struct board_pmic_data *, uint8_t num_ent);
 uint32_t board_soc_version();
 
 #endif
diff --git a/platform/msm_shared/include/certificate.h b/platform/msm_shared/include/certificate.h
index 7a35904..509ec5f 100644
--- a/platform/msm_shared/include/certificate.h
+++ b/platform/msm_shared/include/certificate.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/include/clock-local.h b/platform/msm_shared/include/clock-local.h
index 5a89b86..a9f1151 100644
--- a/platform/msm_shared/include/clock-local.h
+++ b/platform/msm_shared/include/clock-local.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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 met:
@@ -8,7 +8,7 @@
  *   * 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 nor
+ *   * Neither the name of The Linux Foundation nor
  *     the names of its contributors may be used to endorse or promote
  *     products derived from this software without specific prior written
  *     permission.
diff --git a/platform/msm_shared/include/clock.h b/platform/msm_shared/include/clock.h
index 8f1fd11..9e3482b 100644
--- a/platform/msm_shared/include/clock.h
+++ b/platform/msm_shared/include/clock.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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 met:
@@ -8,7 +8,7 @@
  *   * 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 nor
+ *   * Neither the name of The Linux Foundation nor
  *     the names of its contributors may be used to endorse or promote
  *     products derived from this software without specific prior written
  *     permission.
diff --git a/platform/msm_shared/include/clock_pll.h b/platform/msm_shared/include/clock_pll.h
index 29a0a57..22efac3 100644
--- a/platform/msm_shared/include/clock_pll.h
+++ b/platform/msm_shared/include/clock_pll.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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 met:
@@ -8,7 +8,7 @@
  *   * 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 nor
+ *   * Neither the name of The Linux Foundation nor
  *     the names of its contributors may be used to endorse or promote
  *     products derived from this software without specific prior written
  *     permission.
diff --git a/platform/msm_shared/include/crypto_eng.h b/platform/msm_shared/include/crypto_eng.h
index 5b8916f..1b32741 100644
--- a/platform/msm_shared/include/crypto_eng.h
+++ b/platform/msm_shared/include/crypto_eng.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010-2011, 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
@@ -9,7 +9,7 @@
  *     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
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/include/dev_tree.h b/platform/msm_shared/include/dev_tree.h
index 5c58b38..389ab49 100644
--- a/platform/msm_shared/include/dev_tree.h
+++ b/platform/msm_shared/include/dev_tree.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2013, 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
@@ -37,6 +37,9 @@
 #define DEV_TREE_VERSION        1
 #define DEV_TREE_HEADER_SIZE    12
 
+#define DTB_MAGIC               0xedfe0dd0
+#define DTB_OFFSET              0x2C
+
 struct dt_entry
 {
 	uint32_t platform_id;
@@ -62,5 +65,5 @@
 struct dt_entry * dev_tree_get_entry_ptr(struct dt_table *);
 int update_device_tree(void *, const char *, void *, unsigned);
 int dev_tree_add_mem_info(void *fdt, uint32_t offset, uint32_t size, uint32_t addr);
-
+uint32_t dev_tree_appended(void *);
 #endif
diff --git a/platform/msm_shared/include/gsbi.h b/platform/msm_shared/include/gsbi.h
index 2b1ad75..ce473dd 100644
--- a/platform/msm_shared/include/gsbi.h
+++ b/platform/msm_shared/include/gsbi.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -9,7 +9,7 @@
  *     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
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/include/hdmi.h b/platform/msm_shared/include/hdmi.h
index 489da12..0b4fd5b 100644
--- a/platform/msm_shared/include/hdmi.h
+++ b/platform/msm_shared/include/hdmi.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010-2013, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
@@ -36,8 +36,6 @@
 #include <dev/fbcon.h>
 #include <target/display.h>
 
-#define FB_ADDR   0x43E00000
-
 #define MDP_GET_PACK_PATTERN(a,x,y,z,bit) (((a)<<(bit*3))|((x)<<(bit*2))|((y)<<bit)|(z))
 #define DMA_PACK_ALIGN_LSB 0
 #define DMA_PACK_PATTERN_RGB \
@@ -63,7 +61,12 @@
 		      uint8_t dir, uint8_t pull,
 		      uint8_t drvstr, uint32_t enable);
 
-void dtv_on();
+int  hdmi_dtv_on(void);
+void hdmi_msm_set_mode(int on);
+void hdmi_msm_init_phy(void);
+void hdmi_display_shutdown(void);
+void hdmi_msm_reset_core(void);
+void hdmi_set_fb_addr(void *addr);
 
 struct hdmi_disp_mode_timing_type {
 	uint32_t height;
@@ -75,16 +78,7 @@
 	uint32_t vsync_width;
 	uint32_t vsync_porch_bp;
 	uint32_t refresh_rate;
+	uint32_t bpp;
+	void *base;
 };
-
-static struct fbcon_config fb_cfg = {
-	.height = DTV_FB_HEIGHT,
-	.width = DTV_FB_WIDTH,
-	.stride = DTV_FB_WIDTH,
-	.format = DTV_FORMAT_RGB565,
-	.bpp = DTV_BPP,
-	.update_start = NULL,
-	.update_done = NULL,
-};
-
 #endif				/* __PLATFORM_MSM_SHARED_HDMI_H */
diff --git a/platform/msm_shared/include/image_verify.h b/platform/msm_shared/include/image_verify.h
index fb9e1c5..709aa93 100644
--- a/platform/msm_shared/include/image_verify.h
+++ b/platform/msm_shared/include/image_verify.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
diff --git a/platform/msm_shared/include/mdp3.h b/platform/msm_shared/include/mdp3.h
index d4a3081..813b4ba 100644
--- a/platform/msm_shared/include/mdp3.h
+++ b/platform/msm_shared/include/mdp3.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/include/mdp4.h b/platform/msm_shared/include/mdp4.h
index e09cbaf..e0fc2c7 100644
--- a/platform/msm_shared/include/mdp4.h
+++ b/platform/msm_shared/include/mdp4.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011-2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/include/mdp5.h b/platform/msm_shared/include/mdp5.h
index 2091ed1..497b4d0 100644
--- a/platform/msm_shared/include/mdp5.h
+++ b/platform/msm_shared/include/mdp5.h
@@ -100,6 +100,12 @@
 
 #define VBIF_VBIF_DDR_FORCE_CLK_ON              REG_MDP(0x24004)
 #define VBIF_VBIF_DDR_OUT_MAX_BURST             REG_MDP(0x240D8)
+#define VBIF_VBIF_DDR_ARB_CTRL                  REG_MDP(0x240F0)
+#define VBIF_VBIF_DDR_RND_RBN_QOS_ARB           REG_MDP(0x24124)
+#define VBIF_VBIF_DDR_AXI_AMEMTYPE_CONF0        REG_MDP(0x24160)
+#define VBIF_VBIF_DDR_AXI_AMEMTYPE_CONF1        REG_MDP(0x24164)
+#define VBIF_VBIF_DDR_OUT_AOOO_AXI_EN           REG_MDP(0x24178)
+#define VBIF_VBIF_DDR_OUT_AX_AOOO               REG_MDP(0x2417C)
 
 void mdp_set_revision(int rev);
 int mdp_get_revision();
diff --git a/platform/msm_shared/include/mipi_dsi.h b/platform/msm_shared/include/mipi_dsi.h
index 8e44068..c067714 100644
--- a/platform/msm_shared/include/mipi_dsi.h
+++ b/platform/msm_shared/include/mipi_dsi.h
@@ -482,7 +482,7 @@
 	0x10, 0x00, DTYPE_GEN_LWRITE, 0xC0,
 	0xC1, 0x00, 0xA8, 0x00,
 	0x00, 0x00, 0x00, 0x00,
-	0x9D, 0x08, 0x27, 0x09,
+	0x9D, 0x08, 0x27, 0x00,
 	0x00, 0x00, 0x00, 0x00
 };
 
@@ -793,12 +793,12 @@
 	 (char *)toshiba_mdv24_gamma_ctrl_a_pos},
 	{sizeof(toshiba_mdv24_gamma_ctrl_a_neg),
 	 (char *)toshiba_mdv24_gamma_ctrl_a_neg},
-	{sizeof(toshiba_mdv24_gamma_ctrl_a_pos),
-	 (char *)toshiba_mdv24_gamma_ctrl_a_pos},
-	{sizeof(toshiba_mdv24_gamma_ctrl_a_neg),
-	 (char *)toshiba_mdv24_gamma_ctrl_a_neg},
 	{sizeof(toshiba_mdv24_gamma_ctrl_b_pos),
 	 (char *)toshiba_mdv24_gamma_ctrl_b_pos},
+	{sizeof(toshiba_mdv24_gamma_ctrl_b_neg),
+	 (char *)toshiba_mdv24_gamma_ctrl_b_neg},
+	{sizeof(toshiba_mdv24_gamma_ctrl_c_pos),
+	 (char *)toshiba_mdv24_gamma_ctrl_c_pos},
 	{sizeof(toshiba_mdv24_gamma_ctrl_c_neg),
 	 (char *)toshiba_mdv24_gamma_ctrl_c_neg},
 	{sizeof(toshiba_mdv24_pwr_setting1),
diff --git a/platform/msm_shared/include/mmc_dml.h b/platform/msm_shared/include/mmc_dml.h
index 3941bf6..2dde790 100644
--- a/platform/msm_shared/include/mmc_dml.h
+++ b/platform/msm_shared/include/mmc_dml.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *      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
+ *    * Neither the name of The Linux Foundation nor the names of its
  *      contributors may be used to endorse or promote products derived
  *      from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/include/mmu.h b/platform/msm_shared/include/mmu.h
index 9a946a8..6d001e7 100644
--- a/platform/msm_shared/include/mmu.h
+++ b/platform/msm_shared/include/mmu.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -9,7 +9,7 @@
  *     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
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/include/msm_panel.h b/platform/msm_shared/include/msm_panel.h
index 6e14bd0..1519a98 100644
--- a/platform/msm_shared/include/msm_panel.h
+++ b/platform/msm_shared/include/msm_panel.h
@@ -76,6 +76,15 @@
 	uint32_t rev;
 };
 
+struct hdmi_panel_info {
+	uint32_t h_back_porch;
+	uint32_t h_front_porch;
+	uint32_t h_pulse_width;
+	uint32_t v_back_porch;
+	uint32_t v_front_porch;
+	uint32_t v_pulse_width;
+};
+
 struct lcdc_panel_info {
 	uint32_t h_back_porch;
 	uint32_t h_front_porch;
@@ -166,6 +175,7 @@
 	struct lcdc_panel_info lcdc;
 	struct mipi_panel_info mipi;
 	struct lvds_panel_info lvds;
+	struct hdmi_panel_info hdmi;
 
 	int (*on) (void);
 	int (*off) (void);
diff --git a/platform/msm_shared/include/partition_parser.h b/platform/msm_shared/include/partition_parser.h
index bbfbce8..57a92df 100644
--- a/platform/msm_shared/include/partition_parser.h
+++ b/platform/msm_shared/include/partition_parser.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011, 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
@@ -9,7 +9,7 @@
  *     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
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/include/qgic.h b/platform/msm_shared/include/qgic.h
index 8ef9108..45607ff 100644
--- a/platform/msm_shared/include/qgic.h
+++ b/platform/msm_shared/include/qgic.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -10,7 +10,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/include/qtimer.h b/platform/msm_shared/include/qtimer.h
index 480efd6..fd680a0 100644
--- a/platform/msm_shared/include/qtimer.h
+++ b/platform/msm_shared/include/qtimer.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *     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
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/include/qtimer_mmap_hw.h b/platform/msm_shared/include/qtimer_mmap_hw.h
index 3adaffb..11dbcdc 100644
--- a/platform/msm_shared/include/qtimer_mmap_hw.h
+++ b/platform/msm_shared/include/qtimer_mmap_hw.h
@@ -1,5 +1,5 @@
 
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -10,7 +10,7 @@
  *     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
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/include/splash.h b/platform/msm_shared/include/splash.h
index 2faa599..d908cf6 100644
--- a/platform/msm_shared/include/splash.h
+++ b/platform/msm_shared/include/splash.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/include/spmi.h b/platform/msm_shared/include/spmi.h
index d6a0b74..9fa4146 100644
--- a/platform/msm_shared/include/spmi.h
+++ b/platform/msm_shared/include/spmi.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *      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
+ *    * Neither the name of The Linux Foundation nor the names of its
  *      contributors may be used to endorse or promote products derived
  *      from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/include/uart_dm.h b/platform/msm_shared/include/uart_dm.h
index 3421666..1dd0aad 100644
--- a/platform/msm_shared/include/uart_dm.h
+++ b/platform/msm_shared/include/uart_dm.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -9,7 +9,7 @@
  *     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
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/interrupts.c b/platform/msm_shared/interrupts.c
index e310f9a..9d84bb2 100644
--- a/platform/msm_shared/interrupts.c
+++ b/platform/msm_shared/interrupts.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/lcdc.c b/platform/msm_shared/lcdc.c
index 0c87b39..dff03c8 100644
--- a/platform/msm_shared/lcdc.c
+++ b/platform/msm_shared/lcdc.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/platform/msm_shared/lvds.c b/platform/msm_shared/lvds.c
index b9a5813..85ab7fb 100644
--- a/platform/msm_shared/lvds.c
+++ b/platform/msm_shared/lvds.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/mdp4.c b/platform/msm_shared/mdp4.c
index 61b6cd1..e347438 100644
--- a/platform/msm_shared/mdp4.c
+++ b/platform/msm_shared/mdp4.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011-2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/mdp5.c b/platform/msm_shared/mdp5.c
index 54fc33b..468969c 100644
--- a/platform/msm_shared/mdp5.c
+++ b/platform/msm_shared/mdp5.c
@@ -111,19 +111,22 @@
 	/* write active region size*/
 	mdp_rgb_size = (fb->height << 16) + fb->width;
 
-	/* Ping-Pong done Tear Check Read/Write  */
-	/* Underrun(Interface 0/1/2/3) VSYNC Interrupt Enable  */
-	writel(0xFF777713, MDP_INTR_EN);
-
 	access_secure = restore_secure_cfg(SECURE_DEVICE_MDSS);
 
 	mdp_clk_gating_ctrl();
 
-	if (!access_secure) {
+	/* Ignore TZ return value till it's fixed */
+	if (!access_secure || 1) {
 		/* Force VBIF Clocks on  */
 		writel(0x1, VBIF_VBIF_DDR_FORCE_CLK_ON);
 		/* Configure DDR burst length */
 		writel(0x00000707, VBIF_VBIF_DDR_OUT_MAX_BURST);
+		writel(0x00000030, VBIF_VBIF_DDR_ARB_CTRL );
+		writel(0x00000001, VBIF_VBIF_DDR_RND_RBN_QOS_ARB);
+		writel(0x00000FFF, VBIF_VBIF_DDR_OUT_AOOO_AXI_EN);
+		writel(0x0FFF0FFF, VBIF_VBIF_DDR_OUT_AX_AOOO);
+		writel(0x22222222, VBIF_VBIF_DDR_AXI_AMEMTYPE_CONF0);
+		writel(0x00002222, VBIF_VBIF_DDR_AXI_AMEMTYPE_CONF1);
 	}
 
 	/* Allocate SMP blocks */
@@ -211,9 +214,10 @@
 		/* Ping-Pong done Tear Check Read/Write  */
 		/* Underrun(Interface 0/1/2/3) VSYNC Interrupt Enable  */
 		writel(0xFF777713, MDP_INTR_CLEAR);
-		writel(0x00000000, MDP_INTR_EN);
 	}
 
+	writel(0x00000000, MDP_INTR_EN);
+
 	return NO_ERROR;
 }
 
diff --git a/platform/msm_shared/mipi_dsi.c b/platform/msm_shared/mipi_dsi.c
index 7a1c4eb..64fe03d 100644
--- a/platform/msm_shared/mipi_dsi.c
+++ b/platform/msm_shared/mipi_dsi.c
@@ -862,9 +862,6 @@
 
 int mipi_dsi_off()
 {
-	writel(0x01010101, DSI_INT_CTRL);
-	writel(0x13FF3BFF, DSI_ERR_INT_MASK0);
-
 	if(!target_cont_splash_screen())
 	{
 		writel(0, DSI_CLK_CTRL);
@@ -874,9 +871,12 @@
 		mdelay(10);
 		writel(0x0001, DSI_SOFT_RESET);
 		writel(0x0000, DSI_SOFT_RESET);
+		writel(0x1115501, DSI_INT_CTRL);
 		writel(0, DSI_CTRL);
 	}
 
+	writel(0x1115501, DSI_INT_CTRL);
+
 	return NO_ERROR;
 }
 
diff --git a/platform/msm_shared/partition_parser.c b/platform/msm_shared/partition_parser.c
index cd11632..7172425 100644
--- a/platform/msm_shared/partition_parser.c
+++ b/platform/msm_shared/partition_parser.c
@@ -255,7 +255,7 @@
 	}
 	partition_0 = GET_LLWORD_FROM_BYTE(&data[PARTITION_ENTRIES_OFFSET]);
 	/* Read GPT Entries */
-	for (i = 0; i < ROUNDUP(max_partition_count, 4); i++) {
+	for (i = 0; i < (ROUNDUP(max_partition_count, 4)) / 4; i++) {
 		ASSERT(partition_count < NUM_PARTITIONS);
 		ret = mmc_boot_read_from_card(mmc_host, mmc_card,
 					      (partition_0 * BLOCK_SIZE) +
diff --git a/platform/msm_shared/qgic.c b/platform/msm_shared/qgic.c
index 713df57..e7888d1 100644
--- a/platform/msm_shared/qgic.c
+++ b/platform/msm_shared/qgic.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/platform/msm_shared/qtimer.c b/platform/msm_shared/qtimer.c
index 81f5b2f..bf9de81 100644
--- a/platform/msm_shared/qtimer.c
+++ b/platform/msm_shared/qtimer.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *     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
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/qtimer_cp15.c b/platform/msm_shared/qtimer_cp15.c
index a9a5496..4e56637 100644
--- a/platform/msm_shared/qtimer_cp15.c
+++ b/platform/msm_shared/qtimer_cp15.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *     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
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/qtimer_mmap.c b/platform/msm_shared/qtimer_mmap.c
index 1e32b53..ef76075 100644
--- a/platform/msm_shared/qtimer_mmap.c
+++ b/platform/msm_shared/qtimer_mmap.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *     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
+ *   * Neither the name of The Linux Foundation nor the names of its
  *     contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/rules.mk b/platform/msm_shared/rules.mk
index 337e4a4..1045240 100644
--- a/platform/msm_shared/rules.mk
+++ b/platform/msm_shared/rules.mk
@@ -36,7 +36,8 @@
 endif
 
 ifeq ($(PLATFORM),msm8960)
-	OBJS += $(LOCAL_DIR)/mipi_dsi.o \
+	OBJS += $(LOCAL_DIR)/hdmi.o \
+			$(LOCAL_DIR)/mipi_dsi.o \
 			$(LOCAL_DIR)/i2c_qup.o \
 			$(LOCAL_DIR)/uart_dm.o \
 			$(LOCAL_DIR)/qgic.o \
@@ -99,6 +100,11 @@
 			$(LOCAL_DIR)/spmi.o \
 			$(LOCAL_DIR)/bam.o \
 			$(LOCAL_DIR)/qpic_nand.o \
+            $(LOCAL_DIR)/certificate.o \
+            $(LOCAL_DIR)/image_verify.o \
+            $(LOCAL_DIR)/crypto_hash.o \
+            $(LOCAL_DIR)/crypto5_eng.o \
+            $(LOCAL_DIR)/crypto5_wrapper.o \
 			$(LOCAL_DIR)/dev_tree.o
 endif
 
diff --git a/platform/msm_shared/scm.c b/platform/msm_shared/scm.c
index dae8723..c46b1eb 100644
--- a/platform/msm_shared/scm.c
+++ b/platform/msm_shared/scm.c
@@ -187,7 +187,7 @@
 	int ret, scm_ret = 0;
 	tz_secure_cfg secure_cfg;
 
-	secure_cfg.id    = 1;
+	secure_cfg.id    = id;
 	secure_cfg.spare = 0;
 
 	ret = scm_call(SVC_MEMORY_PROTECTION, IOMMU_SECURE_CFG, &secure_cfg, sizeof(secure_cfg),
diff --git a/platform/msm_shared/smem.h b/platform/msm_shared/smem.h
index c600f6f..39d53e8 100755
--- a/platform/msm_shared/smem.h
+++ b/platform/msm_shared/smem.h
@@ -33,6 +33,10 @@
 
 #include <sys/types.h>
 
+#define SMEM_V7_SMEM_MAX_PMIC_DEVICES   1
+#define SMEM_V8_SMEM_MAX_PMIC_DEVICES   3
+#define SMEM_MAX_PMIC_DEVICES           SMEM_V8_SMEM_MAX_PMIC_DEVICES
+
 struct smem_proc_comm {
 	unsigned command;
 	unsigned status;
@@ -91,8 +95,18 @@
    PMIC_IS_PM8038,
    PMIC_IS_PM8922,
    PMIC_IS_PM8917,
-   PMIC_IS_INVALID = 0xffffffff,
-} pm_model_type;
+   PMIC_IS_INVALID = 0x7fffffff,
+} pm_model_type_afly;
+
+typedef enum
+{
+	PMIC_IS_UNKNOWN   = 0,
+	PMIC_IS_PM8941    = 1,
+	PMIC_IS_PM8841    = 2,
+	PMIC_IS_PM8019    = 3,
+	PMIC_IS_PM8026    = 4,
+	PMIC_IS_PM8110    = 5,
+} pm_model_type_bfly;
 
 struct smem_board_info_v3 {
 	unsigned format;
@@ -134,6 +148,24 @@
 	unsigned buffer_align;	//Need for 8 bytes alignment while reading from shared memory.
 };
 
+struct smem_pmic_info {
+	unsigned pmic_type;
+	unsigned pmic_version;
+};
+
+struct smem_board_info_v8 {
+	struct smem_board_info_v3 board_info_v3;
+	unsigned platform_version;
+	unsigned fused_chip;
+	unsigned platform_subtype;
+	struct smem_pmic_info pmic_info[SMEM_V8_SMEM_MAX_PMIC_DEVICES];
+	/*
+	 * Need for 8 bytes alignment
+	 * while reading from shared memory
+	 */
+	unsigned buffer_align;
+};
+
 typedef struct {
 	unsigned key_len;
 	unsigned iv_len;
@@ -219,7 +251,7 @@
 	MSM8660A = 122,
 	MSM8260A = 123,
 	APQ8060A = 124,
-    MSM8974 = 126,
+	MSM8974 = 126,
 	MSM8225 = 127,
 	MSM8625 = 129,
 	MPQ8064 = 130,
@@ -237,6 +269,7 @@
 	MSM8930AA = 142,
 	MSM8630AA = 143,
 	MSM8230AA = 144,
+	MSM8626   = 145,
 	MDM9225   = 149,
 	MDM9225M  = 150,
 	MDM9625M  = 152,
@@ -245,9 +278,17 @@
 	MSM8630AB = 155,
 	MSM8230AB = 156,
 	APQ8030AB = 157,
+	MSM8226   = 158,
+	MSM8826   = 159,
 	APQ8030AA = 160,
 	MSM8125   = 167,
 	APQ8064AA = 172, /* aka V2 SLOW_PRIME */
+	MSM8130   = 179,
+	MSM8130AA = 180,
+	MSM8130AB = 181,
+	MSM8627AA = 182,
+	MSM8227AA = 183,
+	APQ8074   = 184,
 };
 
 enum platform {
diff --git a/platform/msm_shared/spi.c b/platform/msm_shared/spi.c
index 1051f42..c9c3dc1 100644
--- a/platform/msm_shared/spi.c
+++ b/platform/msm_shared/spi.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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
diff --git a/platform/msm_shared/spmi.c b/platform/msm_shared/spmi.c
index b361a30..6023213 100644
--- a/platform/msm_shared/spmi.c
+++ b/platform/msm_shared/spmi.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *      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
+ *    * Neither the name of The Linux Foundation nor the names of its
  *      contributors may be used to endorse or promote products derived
  *      from this software without specific prior written permission.
  *
diff --git a/platform/msm_shared/timer.c b/platform/msm_shared/timer.c
index 2949c8d..bafdd3e 100644
--- a/platform/msm_shared/timer.c
+++ b/platform/msm_shared/timer.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/platform/qsd8650a/acpuclock.c b/platform/qsd8650a/acpuclock.c
index 259a2d4..4c5ed5e 100644
--- a/platform/qsd8650a/acpuclock.c
+++ b/platform/qsd8650a/acpuclock.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2010, 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
diff --git a/platform/qsd8650a/arch_init.S b/platform/qsd8650a/arch_init.S
index bb2474a..d9456b7 100644
--- a/platform/qsd8650a/arch_init.S
+++ b/platform/qsd8650a/arch_init.S
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2008-2010, The Linux Foundation. All rights reserved.
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
diff --git a/platform/qsd8k/acpuclock.c b/platform/qsd8k/acpuclock.c
index d2de674..0ecb68f 100644
--- a/platform/qsd8k/acpuclock.c
+++ b/platform/qsd8k/acpuclock.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009, 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
diff --git a/platform/qsd8k/arch_init.S b/platform/qsd8k/arch_init.S
index 1e93696..cdeb381 100644
--- a/platform/qsd8k/arch_init.S
+++ b/platform/qsd8k/arch_init.S
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2008-2009, The Linux Foundation. All rights reserved.
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
  *
diff --git a/project/msm8226.mk b/project/msm8226.mk
index 0ba5aaa..a9d45b2 100644
--- a/project/msm8226.mk
+++ b/project/msm8226.mk
@@ -13,4 +13,4 @@
 #DEFINES += WITH_DEBUG_FBCON=1
 DEFINES += DEVICE_TREE=1
 #DEFINES += MMC_BOOT_BAM=1
-#DEFINES += CRYPTO_BAM=1
+DEFINES += CRYPTO_BAM=1
diff --git a/target/mdm9615/atags.c b/target/mdm9615/atags.c
index 96a82d9..59dc1f0 100755
--- a/target/mdm9615/atags.c
+++ b/target/mdm9615/atags.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009-2011, 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 met:
@@ -7,7 +7,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/target/mdm9615/init.c b/target/mdm9615/init.c
index daedbc3..01e068f 100644
--- a/target/mdm9615/init.c
+++ b/target/mdm9615/init.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2012, 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
diff --git a/target/mdm9615/keypad.c b/target/mdm9615/keypad.c
index 79855cf..d047b7b 100644
--- a/target/mdm9615/keypad.c
+++ b/target/mdm9615/keypad.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011, 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 met:
@@ -8,7 +8,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/target/mdm9615/tools/mkheader.c b/target/mdm9615/tools/mkheader.c
index cd11810..69c1ab6 100644
--- a/target/mdm9615/tools/mkheader.c
+++ b/target/mdm9615/tools/mkheader.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2007, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/target/mdm9625/include/target/board.h b/target/mdm9625/include/target/board.h
index 81faa85..d0fd5e2 100644
--- a/target/mdm9625/include/target/board.h
+++ b/target/mdm9625/include/target/board.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/target/mdm9625/tools/mkheader.c b/target/mdm9625/tools/mkheader.c
index 67de104..5132238 100644
--- a/target/mdm9625/tools/mkheader.c
+++ b/target/mdm9625/tools/mkheader.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2007, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2012, 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
diff --git a/target/msm7627_surf/atags.c b/target/msm7627_surf/atags.c
index 29c005a..d7865f0 100644
--- a/target/msm7627_surf/atags.c
+++ b/target/msm7627_surf/atags.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009-2010, 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 met:
@@ -7,7 +7,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/target/msm7627_surf/include/target/display.h b/target/msm7627_surf/include/target/display.h
index 9c1bea0..3738405 100644
--- a/target/msm7627_surf/include/target/display.h
+++ b/target/msm7627_surf/include/target/display.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/target/msm7627_surf/init.c b/target/msm7627_surf/init.c
index 514758a..d0bdce6 100644
--- a/target/msm7627_surf/init.c
+++ b/target/msm7627_surf/init.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/target/msm7627_surf/keypad.c b/target/msm7627_surf/keypad.c
index a77e267..609a18a 100644
--- a/target/msm7627_surf/keypad.c
+++ b/target/msm7627_surf/keypad.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009, 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
diff --git a/target/msm7627_surf/tools/mkheader.c b/target/msm7627_surf/tools/mkheader.c
index c60b9c1..a366efc 100644
--- a/target/msm7627_surf/tools/mkheader.c
+++ b/target/msm7627_surf/tools/mkheader.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2007, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/target/msm7627a/atags.c b/target/msm7627a/atags.c
index 8425916..3d726c4 100644
--- a/target/msm7627a/atags.c
+++ b/target/msm7627a/atags.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009-2011, 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 met:
@@ -7,7 +7,7 @@
  *	 * 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 nor
+ *	 * Neither the name of The Linux Foundation nor
  *	   the names of its contributors may be used to endorse or promote
  *	   products derived from this software without specific prior written
  *	   permission.
diff --git a/target/msm7627a/include/target/display.h b/target/msm7627a/include/target/display.h
index e3973e7..b50b477 100644
--- a/target/msm7627a/include/target/display.h
+++ b/target/msm7627a/include/target/display.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010-2011, 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
@@ -9,7 +9,7 @@
  *	   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
+ *	 * Neither the name of The Linux Foundation nor the names of its
  *	   contributors may be used to endorse or promote products derived
  *	   from this software without specific prior written permission.
  *
diff --git a/target/msm7627a/tools/mkheader.c b/target/msm7627a/tools/mkheader.c
index 0eac822..a4d0370 100644
--- a/target/msm7627a/tools/mkheader.c
+++ b/target/msm7627a/tools/mkheader.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2007, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2010-2011, 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
diff --git a/target/msm7630_surf/atags.c b/target/msm7630_surf/atags.c
index c90f94d..d615d27 100644
--- a/target/msm7630_surf/atags.c
+++ b/target/msm7630_surf/atags.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009, 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 met:
@@ -7,7 +7,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/target/msm7630_surf/include/target/display.h b/target/msm7630_surf/include/target/display.h
index 69cd4ac..9566b46 100644
--- a/target/msm7630_surf/include/target/display.h
+++ b/target/msm7630_surf/include/target/display.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/target/msm7630_surf/init.c b/target/msm7630_surf/init.c
index f74b65f..9fb5b44 100644
--- a/target/msm7630_surf/init.c
+++ b/target/msm7630_surf/init.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/target/msm7630_surf/keypad.c b/target/msm7630_surf/keypad.c
index 4507f35..4a6fda0 100644
--- a/target/msm7630_surf/keypad.c
+++ b/target/msm7630_surf/keypad.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2010, 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
diff --git a/target/msm7630_surf/tools/mkheader.c b/target/msm7630_surf/tools/mkheader.c
index 4ebdde9..2de9b74 100644
--- a/target/msm7630_surf/tools/mkheader.c
+++ b/target/msm7630_surf/tools/mkheader.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2007, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2010, 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
diff --git a/target/msm8226/init.c b/target/msm8226/init.c
index 52539a0..e7b6a22 100644
--- a/target/msm8226/init.c
+++ b/target/msm8226/init.c
@@ -33,11 +33,29 @@
 #include <platform.h>
 #include <uart_dm.h>
 #include <mmc.h>
+#include <platform/gpio.h>
 #include <spmi.h>
 #include <board.h>
+#include <smem.h>
+#include <baseband.h>
+#include <dev/keys.h>
+#include <pm8x41.h>
+#include <crypto5_wrapper.h>
+#include <hsusb.h>
 
-#define PMIC_ARB_CHANNEL_NUM    0
-#define PMIC_ARB_OWNER_ID       0
+extern  bool target_use_signed_kernel(void);
+
+#define PMIC_ARB_CHANNEL_NUM               0
+#define PMIC_ARB_OWNER_ID                  0
+
+#define CRYPTO_ENGINE_INSTANCE             1
+#define CRYPTO_ENGINE_EE                   1
+#define CRYPTO_ENGINE_FIFO_SIZE            64
+#define CRYPTO_ENGINE_READ_PIPE            3
+#define CRYPTO_ENGINE_WRITE_PIPE           2
+#define CRYPTO_ENGINE_CMD_ARRAY_SIZE       20
+
+#define TLMM_VOL_UP_BTN_GPIO    106
 
 static uint32_t mmc_sdc_base[] =
 	{ MSM_SDC1_BASE, MSM_SDC2_BASE, MSM_SDC3_BASE };
@@ -49,8 +67,61 @@
 #endif
 }
 
+/* Return 1 if vol_up pressed */
+static int target_volume_up()
+{
+	uint8_t status = 0;
+
+	gpio_tlmm_config(TLMM_VOL_UP_BTN_GPIO, 0, GPIO_INPUT, GPIO_PULL_UP, GPIO_2MA, GPIO_ENABLE);
+
+	thread_sleep(10);
+
+	/* Get status of GPIO */
+	status = gpio_status(TLMM_VOL_UP_BTN_GPIO);
+
+	/* Active low signal. */
+	return !status;
+}
+
+/* Return 1 if vol_down pressed */
+uint32_t target_volume_down()
+{
+	/* Volume down button tied in with PMIC RESIN. */
+	return pm8x41_resin_status();
+}
+
 static void target_keystatus()
 {
+	keys_init();
+
+	if(target_volume_down())
+		keys_post_event(KEY_VOLUMEDOWN, 1);
+
+	if(target_volume_up())
+		keys_post_event(KEY_VOLUMEUP, 1);
+}
+
+/* Set up params for h/w CRYPTO_ENGINE. */
+void target_crypto_init_params()
+{
+	struct crypto_init_params ce_params;
+
+	/* Set up base addresses and instance. */
+	ce_params.crypto_instance  = CRYPTO_ENGINE_INSTANCE;
+	ce_params.crypto_base      = MSM_CE1_BASE;
+	ce_params.bam_base         = MSM_CE1_BAM_BASE;
+
+	/* Set up BAM config. */
+	ce_params.bam_ee           = CRYPTO_ENGINE_EE;
+	ce_params.pipes.read_pipe  = CRYPTO_ENGINE_READ_PIPE;
+	ce_params.pipes.write_pipe = CRYPTO_ENGINE_WRITE_PIPE;
+
+	/* Assign buffer sizes. */
+	ce_params.num_ce           = CRYPTO_ENGINE_CMD_ARRAY_SIZE;
+	ce_params.read_fifo_size   = CRYPTO_ENGINE_FIFO_SIZE;
+	ce_params.write_fifo_size  = CRYPTO_ENGINE_FIFO_SIZE;
+
+	crypto_init_params(&ce_params);
 }
 
 void target_init(void)
@@ -78,6 +149,58 @@
 			ASSERT(0);
 		}
 	}
+
+	if (target_use_signed_kernel())
+		target_crypto_init_params();
+}
+
+/* Do any target specific intialization needed before entering fastboot mode */
+void target_fastboot_init(void)
+{
+	/* Set the BOOT_DONE flag in PM8026 */
+	pm8x41_set_boot_done();
+}
+
+/* Detect the target type */
+void target_detect(struct board_data *board)
+{
+	board->target = LINUX_MACHTYPE_UNKNOWN;
+}
+
+/* Detect the modem type */
+void target_baseband_detect(struct board_data *board)
+{
+	uint32_t platform;
+	uint32_t platform_subtype;
+
+	platform         = board->platform;
+	platform_subtype = board->platform_subtype;
+
+	/*
+	 * Look for platform subtype if present, else
+	 * check for platform type to decide on the
+	 * baseband type
+	 */
+	switch(platform_subtype)
+	{
+	case HW_PLATFORM_SUBTYPE_UNKNOWN:
+		break;
+	default:
+		dprintf(CRITICAL, "Platform Subtype : %u is not supported\n", platform_subtype);
+		ASSERT(0);
+	};
+
+	switch(platform)
+	{
+	case MSM8826:
+	case MSM8626:
+	case MSM8226:
+		board->baseband = BASEBAND_MSM;
+		break;
+	default:
+		dprintf(CRITICAL, "Platform type: %u is not supported\n", platform);
+		ASSERT(0);
+	};
 }
 
 void target_serialno(unsigned char *buf)
@@ -89,6 +212,54 @@
 	}
 }
 
+unsigned check_reboot_mode(void)
+{
+	uint32_t restart_reason = 0;
+
+	/* Read reboot reason and scrub it */
+	restart_reason = readl(RESTART_REASON_ADDR);
+	writel(0x00, RESTART_REASON_ADDR);
+
+	return restart_reason;
+}
+
+void reboot_device(unsigned reboot_reason)
+{
+	writel(reboot_reason, RESTART_REASON_ADDR);
+
+	/* Configure PMIC for warm reset */
+	pm8x41_reset_configure(PON_PSHOLD_WARM_RESET);
+
+	/* Drop PS_HOLD for MSM */
+	writel(0x00, MPM2_MPM_PS_HOLD);
+
+	mdelay(5000);
+
+	dprintf(CRITICAL, "Rebooting failed\n");
+}
+
+crypto_engine_type board_ce_type(void)
+{
+	return CRYPTO_ENGINE_TYPE_HW;
+}
+
 unsigned board_machtype(void)
 {
 }
+
+void target_usb_init(void)
+{
+	uint32_t val;
+
+	/* Select and enable external configuration with USB PHY */
+	ulpi_write(ULPI_MISC_A_VBUSVLDEXTSEL | ULPI_MISC_A_VBUSVLDEXT, ULPI_MISC_A_SET);
+
+	/* Enable sess_vld */
+	val = readl(USB_GENCONFIG_2) | GEN2_SESS_VLD_CTRL_EN;
+	writel(val, USB_GENCONFIG_2);
+
+	/* Enable external vbus configuration in the LINK */
+	val = readl(USB_USBCMD);
+	val |= SESS_VLD_CTRL;
+	writel(val, USB_USBCMD);
+}
diff --git a/target/msm8226/meminfo.c b/target/msm8226/meminfo.c
index e5a53d2..3b92733 100644
--- a/target/msm8226/meminfo.c
+++ b/target/msm8226/meminfo.c
@@ -35,6 +35,8 @@
 #include <platform/iomap.h>
 #include <dev_tree.h>
 
+#define MB (1024*1024)
+
 /* Funtion to add the ram partition entries into device tree.
  * The function assumes that all the entire fixed memory regions should
  * be listed in the first bank of the passed in ddr regions.
@@ -54,6 +56,14 @@
         if((ram_ptable.parts[i].category == SDRAM) &&
            (ram_ptable.parts[i].type == SYS_MEMORY))
         {
+			if (ram_ptable.parts[i].start == 0x0)
+			{
+				/* Ensure that the size for this segment is > 1MB */
+				ASSERT(ram_ptable.parts[i].size > 1*MB);
+
+				ram_ptable.parts[i].start += 1*MB;
+				ram_ptable.parts[i].size  -= 1*MB;
+			}
 
 			/* Pass along all other usable memory regions to Linux */
 			ret = dev_tree_add_mem_info(fdt,
diff --git a/target/msm8660_surf/atags.c b/target/msm8660_surf/atags.c
index 14bd796..1b3c70b 100644
--- a/target/msm8660_surf/atags.c
+++ b/target/msm8660_surf/atags.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009-2010, 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 met:
@@ -7,7 +7,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/target/msm8660_surf/include/target/display.h b/target/msm8660_surf/include/target/display.h
index fb2d3c1..9b0c57b 100644
--- a/target/msm8660_surf/include/target/display.h
+++ b/target/msm8660_surf/include/target/display.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/target/msm8660_surf/init.c b/target/msm8660_surf/init.c
index 2146961..8ee11c3 100644
--- a/target/msm8660_surf/init.c
+++ b/target/msm8660_surf/init.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2012, 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
diff --git a/target/msm8660_surf/keypad.c b/target/msm8660_surf/keypad.c
index bb1d38d..a1d8759 100644
--- a/target/msm8660_surf/keypad.c
+++ b/target/msm8660_surf/keypad.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2010-2011, 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 met:
@@ -8,7 +8,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/target/msm8660_surf/tools/mkheader.c b/target/msm8660_surf/tools/mkheader.c
index 4ebdde9..2de9b74 100644
--- a/target/msm8660_surf/tools/mkheader.c
+++ b/target/msm8660_surf/tools/mkheader.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2007, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2010, 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
diff --git a/target/msm8960/atags.c b/target/msm8960/atags.c
index add3f09..8ac045c 100755
--- a/target/msm8960/atags.c
+++ b/target/msm8960/atags.c
@@ -164,15 +164,18 @@
 		case MPQ8064:
 			ptr = target_atag(ptr, mpq8064_first_256M, ARRAY_SIZE(mpq8064_first_256M));
 			break;
+		case MSM8130:
 		case MSM8230:
 		case MSM8930:
 		case MSM8630:
+		case MSM8130AA:
 		case MSM8230AA:
 		case MSM8630AA:
 		case MSM8930AA:
 		case MSM8930AB:
 		case MSM8630AB:
 		case MSM8230AB:
+		case MSM8130AB:
 		case APQ8030AB:
 		case APQ8030:
 		case APQ8030AA:
diff --git a/target/msm8960/include/target/display.h b/target/msm8960/include/target/display.h
index 0f80546..8b9f03a 100644
--- a/target/msm8960/include/target/display.h
+++ b/target/msm8960/include/target/display.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010-2011, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/target/msm8960/init.c b/target/msm8960/init.c
index 2834ddf..52e34f7 100755
--- a/target/msm8960/init.c
+++ b/target/msm8960/init.c
@@ -115,15 +115,18 @@
 	case MSM8660AB:
 		msm8960_keypad_init();
 		break;
+	case MSM8130:
 	case MSM8230:
 	case MSM8630:
 	case MSM8930:
+	case MSM8130AA:
 	case MSM8230AA:
 	case MSM8630AA:
 	case MSM8930AA:
 	case MSM8930AB:
 	case MSM8630AB:
 	case MSM8230AB:
+	case MSM8130AB:
 	case APQ8030AB:
 	case APQ8030:
 	case APQ8030AA:
@@ -357,7 +360,9 @@
 		default:
 			target_id = LINUX_MACHTYPE_8960_CDP;
 		}
-	} else if ((platform == MSM8230)   || (platform == MSM8630)   ||
+	} else if ((platform == MSM8130)           ||
+			   (platform == MSM8130AA) || (platform == MSM8130AB) ||
+			   (platform == MSM8230)   || (platform == MSM8630)   ||
 			   (platform == MSM8930)   || (platform == MSM8230AA) ||
 			   (platform == MSM8630AA) || (platform == MSM8930AA) ||
 			   (platform == MSM8930AB) || (platform == MSM8630AB) ||
@@ -376,7 +381,8 @@
 		default:
 			target_id = LINUX_MACHTYPE_8930_CDP;
 		}
-	} else if ((platform == MSM8227) || (platform == MSM8627)) {
+	} else if ((platform == MSM8227) || (platform == MSM8627) ||
+			   (platform == MSM8227AA) || (platform == MSM8627AA)) {
 		switch (platform_hw) {
 		case HW_PLATFORM_SURF:
 			target_id = LINUX_MACHTYPE_8627_CDP;
diff --git a/target/msm8960/keypad.c b/target/msm8960/keypad.c
index b84780b..1639f19 100644
--- a/target/msm8960/keypad.c
+++ b/target/msm8960/keypad.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011-2012, 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 met:
@@ -8,7 +8,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
@@ -134,11 +134,9 @@
 
 void msm8930_keypad_init(void)
 {
-	uint32_t pm_type = board_pmic_type();
-
 	msm8930_keypad_gpio_init();
 
-	if (pm_type == PMIC_IS_PM8917)
+	if (platform_pmic_type(PMIC_IS_PM8917))
 	{
 		ssbi_gpio_keypad_init(&msm8930_pm8917_qwerty_keypad);
 	}
@@ -150,11 +148,9 @@
 
 void apq8064_keypad_init(void)
 {
-	uint32_t pm_type = board_pmic_type();
-
 	apq8064_keypad_gpio_init();
 
-	if (pm_type == PMIC_IS_PM8917)
+	if (platform_pmic_type(PMIC_IS_PM8917))
 		ssbi_gpio_keypad_init(&apq8064_pm8917_qwerty_keypad);
 	else
 		ssbi_gpio_keypad_init(&apq8064_pm8921_qwerty_keypad);
diff --git a/target/msm8960/rules.mk b/target/msm8960/rules.mk
index 0074ccc..8cf761c 100644
--- a/target/msm8960/rules.mk
+++ b/target/msm8960/rules.mk
@@ -18,6 +18,7 @@
 
 DEFINES += DISPLAY_SPLASH_SCREEN=1
 DEFINES += DISPLAY_TYPE_MIPI=1
+DEFINES += DISPLAY_TYPE_HDMI=1
 
 MODULES += \
 	dev/keys \
diff --git a/target/msm8960/target_display.c b/target/msm8960/target_display.c
index 81c8918..39a3aeb 100644
--- a/target/msm8960/target_display.c
+++ b/target/msm8960/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012-2013, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
@@ -148,6 +148,24 @@
 	return 0;
 }
 
+static int mpq8064_hdmi_panel_clock(int enable)
+{
+	if (enable)
+		mdp_clock_init();
+
+	hdmi_app_clk_init(enable);
+
+	return 0;
+}
+
+static int mpq8064_hdmi_panel_power(int enable)
+{
+	if (enable)
+		hdmi_power_init();
+
+	return 0;
+}
+
 static int msm8960_liquid_mipi_panel_clock(int enable)
 {
 	if (enable) {
@@ -298,6 +316,23 @@
 		panel.fb.format = FB_FORMAT_RGB888;
 		panel.mdp_rev = MDP_REV_42;
 		break;
+	case LINUX_MACHTYPE_8064_MPQ_CDP:
+	case LINUX_MACHTYPE_8064_MPQ_HRD:
+	case LINUX_MACHTYPE_8064_MPQ_DTV:
+		hdmi_msm_panel_init(&panel.panel_info);
+
+		panel.clk_func   = mpq8064_hdmi_panel_clock;
+		panel.power_func = mpq8064_hdmi_panel_power;
+		panel.fb.base    = 0x89000000;
+		panel.fb.width   = panel.panel_info.xres;
+		panel.fb.height  = panel.panel_info.yres;
+		panel.fb.stride  = panel.panel_info.xres;
+		panel.fb.bpp     = panel.panel_info.bpp;
+		panel.fb.format  = FB_FORMAT_RGB565;
+		panel.mdp_rev    = MDP_REV_44;
+
+		hdmi_set_fb_addr(panel.fb.base);
+		break;
 	default:
 		return;
 	};
@@ -307,13 +342,13 @@
 		return;
 	}
 
-	display_image_on_screen();
 	display_enable = 1;
 }
 
 void display_shutdown(void)
 {
-	if (display_enable)
+	if (display_enable) {
 		msm_display_off();
+	}
 }
 
diff --git a/target/msm8960/tools/mkheader.c b/target/msm8960/tools/mkheader.c
index 8c29f9c..4a84bd6 100644
--- a/target/msm8960/tools/mkheader.c
+++ b/target/msm8960/tools/mkheader.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2007, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/target/msm8974/include/target/display.h b/target/msm8974/include/target/display.h
index 0687d24..cc04e0b 100644
--- a/target/msm8974/include/target/display.h
+++ b/target/msm8974/include/target/display.h
@@ -29,7 +29,7 @@
 #ifndef _TARGET_COPPER_DISPLAY_H
 #define _TARGET_COPPER_DISPLAY_H
 
-#define MIPI_FB_ADDR  0x08400000
+#define MIPI_FB_ADDR  0x0D200000
 
 #define MIPI_HSYNC_PULSE_WIDTH       12
 #define MIPI_HSYNC_BACK_PORCH_DCLK   32
diff --git a/target/msm8974/init.c b/target/msm8974/init.c
index 35f00e6..2bbc017 100644
--- a/target/msm8974/init.c
+++ b/target/msm8974/init.c
@@ -40,6 +40,8 @@
 #include <dev/keys.h>
 #include <pm8x41.h>
 #include <crypto5_wrapper.h>
+#include <hsusb.h>
+#include <clock.h>
 
 extern  bool target_use_signed_kernel(void);
 
@@ -200,11 +202,36 @@
 /* Detect the modem type */
 void target_baseband_detect(struct board_data *board)
 {
-	/* Check for baseband variants. Default to MSM */
-	if (board->platform_subtype == HW_PLATFORM_SUBTYPE_MDM)
-		board->baseband = BASEBAND_MDM;
-	else
+	uint32_t platform;
+	uint32_t platform_subtype;
+
+	platform = board->platform;
+	platform_subtype = board->platform_subtype;
+
+	/*
+	 * Look for platform subtype if present, else
+	 * check for platform type to decide on the
+	 * baseband type
+	 */
+	switch(platform_subtype) {
+	case HW_PLATFORM_SUBTYPE_UNKNOWN:
+		break;
+	default:
+		dprintf(CRITICAL, "Platform Subtype : %u is not supported\n",platform_subtype);
+		ASSERT(0);
+	};
+
+	switch(platform) {
+	case MSM8974:
 		board->baseband = BASEBAND_MSM;
+		break;
+	case APQ8074:
+		board->baseband = BASEBAND_APQ;
+		break;
+	default:
+		dprintf(CRITICAL, "Platform type: %u is not supported\n",platform);
+		ASSERT(0);
+	};
 }
 
 void target_serialno(unsigned char *buf)
@@ -270,15 +297,50 @@
 	dprintf(CRITICAL, "Rebooting failed\n");
 }
 
+/* Do target specific usb initialization */
+void target_usb_init(void)
+{
+	/* Enable secondary USB PHY on DragonBoard8074 */
+	if (board_hardware_id() == HW_PLATFORM_DRAGON) {
+		/* Route ChipIDea to use secondary USB HS port2 */
+		writel_relaxed(1, USB2_PHY_SEL);
+
+		/* Enable access to secondary PHY by clamping the low
+		* voltage interface between DVDD of the PHY and Vddcx
+		* (set bit16 (USB2_PHY_HS2_DIG_CLAMP_N_2) = 1) */
+		writel_relaxed(readl_relaxed(USB_OTG_HS_PHY_SEC_CTRL)
+				| 0x00010000, USB_OTG_HS_PHY_SEC_CTRL);
+
+		/* Perform power-on-reset of the PHY.
+		*  Delay values are arbitrary */
+		writel_relaxed(readl_relaxed(USB_OTG_HS_PHY_CTRL)|1,
+				USB_OTG_HS_PHY_CTRL);
+		thread_sleep(10);
+		writel_relaxed(readl_relaxed(USB_OTG_HS_PHY_CTRL) & 0xFFFFFFFE,
+				USB_OTG_HS_PHY_CTRL);
+		thread_sleep(10);
+
+		/* Enable HSUSB PHY port for ULPI interface,
+		* then configure related parameters within the PHY */
+		writel_relaxed(((readl_relaxed(USB_PORTSC) & 0xC0000000)
+				| 0x8c000004), USB_PORTSC);
+	}
+}
+
 /* Returns 1 if target supports continuous splash screen. */
 int target_cont_splash_screen()
 {
-	switch(board_platform_id())
+	switch(board_hardware_id())
 	{
-	case HW_PLATFORM_SURF:
-	case HW_PLATFORM_FFA:
-	default:
-		return 0;
+		case HW_PLATFORM_SURF:
+		case HW_PLATFORM_MTP:
+		case HW_PLATFORM_FLUID:
+			dprintf(SPEW, "Target_cont_splash=1\n");
+			return 1;
+			break;
+		default:
+			dprintf(SPEW, "Target_cont_splash=0\n");
+			return 0;
 	}
 }
 
diff --git a/target/msm8974/target_display.c b/target/msm8974/target_display.c
index f304494..d4be69c 100644
--- a/target/msm8974/target_display.c
+++ b/target/msm8974/target_display.c
@@ -142,6 +142,7 @@
 	switch (hw_id) {
 	case HW_PLATFORM_MTP:
 	case HW_PLATFORM_FLUID:
+	case HW_PLATFORM_SURF:
 		mipi_toshiba_video_720p_init(&(panel.panel_info));
 		panel.clk_func = msm8974_mdss_dsi_panel_clock;
 		panel.power_func = msm8974_mipi_panel_power;
diff --git a/target/msm8974/tools/mkheader.c b/target/msm8974/tools/mkheader.c
index 8c29f9c..4a84bd6 100644
--- a/target/msm8974/tools/mkheader.c
+++ b/target/msm8974/tools/mkheader.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2007, Google Inc.
  * All rights reserved.
  *
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/target/qsd8250_ffa/atags.c b/target/qsd8250_ffa/atags.c
index 77a1fb8..01d9d09 100644
--- a/target/qsd8250_ffa/atags.c
+++ b/target/qsd8250_ffa/atags.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009, 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 met:
@@ -7,7 +7,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/target/qsd8250_ffa/include/target/display.h b/target/qsd8250_ffa/include/target/display.h
index 5a246ee..2fafff0 100644
--- a/target/qsd8250_ffa/include/target/display.h
+++ b/target/qsd8250_ffa/include/target/display.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/target/qsd8250_ffa/init.c b/target/qsd8250_ffa/init.c
index 5f31a1a..920a5b6 100644
--- a/target/qsd8250_ffa/init.c
+++ b/target/qsd8250_ffa/init.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2010, 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
diff --git a/target/qsd8250_ffa/keypad.c b/target/qsd8250_ffa/keypad.c
index 2956336..64e3e7c 100644
--- a/target/qsd8250_ffa/keypad.c
+++ b/target/qsd8250_ffa/keypad.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009, 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
diff --git a/target/qsd8250_surf/atags.c b/target/qsd8250_surf/atags.c
index 77a1fb8..01d9d09 100644
--- a/target/qsd8250_surf/atags.c
+++ b/target/qsd8250_surf/atags.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009, 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 met:
@@ -7,7 +7,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/target/qsd8250_surf/include/target/display.h b/target/qsd8250_surf/include/target/display.h
index 6ccea86..245e12f 100644
--- a/target/qsd8250_surf/include/target/display.h
+++ b/target/qsd8250_surf/include/target/display.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/target/qsd8250_surf/init.c b/target/qsd8250_surf/init.c
index 3b7e03e..f8e346d 100644
--- a/target/qsd8250_surf/init.c
+++ b/target/qsd8250_surf/init.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/target/qsd8250_surf/keypad.c b/target/qsd8250_surf/keypad.c
index c44b06d..84d0859 100644
--- a/target/qsd8250_surf/keypad.c
+++ b/target/qsd8250_surf/keypad.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009, 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
diff --git a/target/qsd8650a_st1x/atags.c b/target/qsd8650a_st1x/atags.c
index 90dfa75..29a399b 100644
--- a/target/qsd8650a_st1x/atags.c
+++ b/target/qsd8650a_st1x/atags.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009-2010, 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 met:
@@ -7,7 +7,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/target/qsd8650a_st1x/include/target/display.h b/target/qsd8650a_st1x/include/target/display.h
index 03f2676..33944d2 100644
--- a/target/qsd8650a_st1x/include/target/display.h
+++ b/target/qsd8650a_st1x/include/target/display.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
diff --git a/target/qsd8650a_st1x/init.c b/target/qsd8650a_st1x/init.c
index d43ea6a..89a0ea1 100644
--- a/target/qsd8650a_st1x/init.c
+++ b/target/qsd8650a_st1x/init.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2011, 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
diff --git a/target/qsd8650a_st1x/keypad.c b/target/qsd8650a_st1x/keypad.c
index aeaa57f..74246cb 100644
--- a/target/qsd8650a_st1x/keypad.c
+++ b/target/qsd8650a_st1x/keypad.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009, 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
diff --git a/target/surf-msm7k/atags.c b/target/surf-msm7k/atags.c
index de0b95e..e67cfc4 100644
--- a/target/surf-msm7k/atags.c
+++ b/target/surf-msm7k/atags.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009, 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 met:
@@ -7,7 +7,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/target/surf-qsd8k/atags.c b/target/surf-qsd8k/atags.c
index e9836e1..92b6da6 100644
--- a/target/surf-qsd8k/atags.c
+++ b/target/surf-qsd8k/atags.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2009, 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 met:
@@ -7,7 +7,7 @@
  *     * 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 nor
+ *     * Neither the name of The Linux Foundation nor
  *       the names of its contributors may be used to endorse or promote
  *       products derived from this software without specific prior written
  *       permission.
diff --git a/target/target_display.c b/target/target_display.c
index 5246188..639a83d 100644
--- a/target/target_display.c
+++ b/target/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -9,7 +9,7 @@
  *       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
+ *     * Neither the name of The Linux Foundation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *