platform,target: msm8952: add msmgold platform

Add msmgold platform identifier and add it to intialization and
clock selection.

Change-Id: I34c536fe8c52e97fa601c9cf26deac9c1e66f280
diff --git a/include/platform.h b/include/platform.h
index de6e544..31de506 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2008 Travis Geiselbrecht
  *
- * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2016, 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
@@ -66,6 +66,7 @@
 int platform_is_msm8909();
 int platform_is_msm8992();
 int platform_is_msm8937();
+int platform_is_msmgold();
 int platform_is_msm8956();
 uint32_t platform_is_msm8976_v_1_1();
 int boot_device_mask(int);
diff --git a/platform/msm8952/msm8952-clock.c b/platform/msm8952/msm8952-clock.c
index bf87489..ea142d7 100644
--- a/platform/msm8952/msm8952-clock.c
+++ b/platform/msm8952/msm8952-clock.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016, 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
@@ -650,7 +650,7 @@
 			msm8976_v_1_1_sdcc_clock_modify();
 	}
 
-	if (platform_is_msm8937())
+	if (platform_is_msm8937() || platform_is_msmgold())
 		msm8937_clock_override();
 
 	clk_init(msm_clocks_8952, ARRAY_SIZE(msm_clocks_8952));
diff --git a/platform/msm8952/platform.c b/platform/msm8952/platform.c
index 5eaa241..180d34b 100644
--- a/platform/msm8952/platform.c
+++ b/platform/msm8952/platform.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016, 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
@@ -177,6 +177,26 @@
 	return 256;
 }
 
+int platform_is_msmgold()
+{
+	uint32_t platform = board_platform_id();
+	uint32_t ret = 0;
+
+	switch(platform)
+	{
+		case MSMGOLD:
+		case MSMGOLD2:
+		case MSMGOLD3:
+		case APQGOLD:
+			ret = 1;
+			break;
+		default:
+			ret = 0;
+	};
+
+	return ret;
+}
+
 int platform_is_msm8937()
 {
 	uint32_t platform = board_platform_id();
diff --git a/target/msm8952/init.c b/target/msm8952/init.c
index 9fbf352..88ff454 100644
--- a/target/msm8952/init.c
+++ b/target/msm8952/init.c
@@ -185,7 +185,7 @@
 
 	if(platform_is_msm8956())
 		vol_up_gpio = TLMM_VOL_UP_BTN_GPIO_8956;
-	else if(platform_is_msm8937())
+	else if(platform_is_msm8937() || platform_is_msmgold())
 		vol_up_gpio = TLMM_VOL_UP_BTN_GPIO_8937;
 	else
 		vol_up_gpio = TLMM_VOL_UP_BTN_GPIO;
@@ -263,7 +263,7 @@
 
 	spmi_init(PMIC_ARB_CHANNEL_NUM, PMIC_ARB_OWNER_ID);
 
-	if(platform_is_msm8937())
+	if(platform_is_msm8937() || platform_is_msmgold())
 	{
 		uint8_t pmi_rev = 0;
 		uint32_t pmi_type = 0;