platform: msm8952: Add platform support for sdm429 and sdm439
Add support for sdm429 and sdm439 platform initialization.
Change-Id: I1546ed2781935a805a6391ecf5f50702a8c9dc34
diff --git a/platform/msm8952/msm8952-clock.c b/platform/msm8952/msm8952-clock.c
index d6c029f..3d2b85c 100644
--- a/platform/msm8952/msm8952-clock.c
+++ b/platform/msm8952/msm8952-clock.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016, 2018, 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,8 @@
msm8976_v_1_1_sdcc_clock_modify();
}
- if (platform_is_msm8937() || platform_is_msm8917())
+ if (platform_is_msm8937() || platform_is_msm8917() ||
+ platform_is_sdm429() || platform_is_sdm439())
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 11501c2..cd771de 100644
--- a/platform/msm8952/platform.c
+++ b/platform/msm8952/platform.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016, 2018, 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
@@ -260,6 +260,41 @@
return ret;
}
+int platform_is_sdm429()
+{
+ uint32_t platform = board_platform_id();
+ uint32_t ret = 0;
+
+ switch(platform)
+ {
+ case SDM429:
+ ret = 1;
+ break;
+ default:
+ ret = 0;
+ };
+
+ return ret;
+}
+
+int platform_is_sdm439()
+{
+ uint32_t platform = board_platform_id();
+ uint32_t ret = 0;
+
+ switch(platform)
+ {
+ case SDM439:
+ ret = 1;
+ break;
+ default:
+ ret = 0;
+ };
+
+ return ret;
+}
+
+
int platform_is_msm8956()
{
uint32_t platform = board_platform_id();
@@ -282,7 +317,8 @@
uint32_t platform_get_tz_app_add()
{
- if(platform_is_msm8937() || platform_is_msm8917())
+ if(platform_is_msm8937() || platform_is_msm8917() ||
+ platform_is_sdm429() || platform_is_sdm439())
return APP_REGION_ADDR_8937;
else
return APP_REGION_ADDR_8952;
@@ -290,7 +326,8 @@
uint32_t platform_get_tz_app_size()
{
- if(platform_is_msm8937() || platform_is_msm8917())
+ if(platform_is_msm8937() || platform_is_msm8917() ||
+ platform_is_sdm429() || platform_is_sdm439())
return APP_REGION_SIZE_8937;
else
return APP_REGION_SIZE_8952;
@@ -298,7 +335,7 @@
uint32_t platform_get_apcs_ipc_base()
{
- if(platform_is_msm8917())
+ if(platform_is_msm8917() || platform_is_sdm429())
return APCS_ALIAS1_IPC_INTERRUPT_1;
else
return APCS_ALIAS0_IPC_INTERRUPT_2;