summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGrzegorz Jaszczyk <jaz@semihalf.com>2017-08-30 13:31:06 +0200
committerKostya Porotchkin <kostap@marvell.com>2017-08-31 16:23:05 +0300
commit72392ef6b448c80e68793586c9e7f1f46731c139 (patch)
tree6bd7221418343eac3f83e2026a5e813c0b0eb7dc /include
parente8fc2d5ebab5dfd07429709a2a3bc36985d610f2 (diff)
plat: marvell: a8k: allow to load scp_bl2 firmware that doesn't contain PM FW
Hitherto if the SCP_BL2 path was defined, Marvell platform code (plat/marvell/a8k/common/a8k_common.mk via plat/marvell/a8k/common/mss/mss_common.mk) was defining SCP_IMAGE, which was used in power management related code(mainly in plat_pm.c) for choosing proper PM related code. Therefore there were two different situation: 1) The SCP_BL2 was not defined, then the ATF used its own PM related code 2) The SCP_BL2 was defined and ATF assumed that during SCP_BL2 stage the firmware with PM support was loaded into MSS AP CM3 and PM was managed mainly via IPC messages between ATF and MSS AP CM3 firmware. Now in some cases the firmware for MSS AP CM3 does not support PM therefore it causes some issue: during Linux boot only one CPU was brought out from reset and all secondary CPUs remained down. After this change the Marvell platform code can verify if the firmware loaded to MSS AP CM3 has PM support at runtime and does not make assumption basing on SCP_BL2 definition anymore. In other words all preprocessor condition of SCP_IMAGE was replaced by runtime condition that allows to really distinguish between situation where we are running PM firmware or not, so three different scenario are possible and handled correctly now: 1) The SCP_BL2 is not used at all then the ATF uses its own PM related code. 2) The SCP_BL2 contains firmware for MSS AP CM3 and it supports PM, then ATF manage PM mainly via IPC messages between ATF and MSS AP CM3 firmware. 3) The SCP_BL2 does not contain firmware for MSS AP CM3 or it contain firmware that does not support PM, then ATF uses its own PM related code. Change-Id: I26da4db968966cb5e61714ff192fb645a3a57875 Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com> Reviewed-on: http://vgitil04.il.marvell.com:8080/43573 Tested-by: iSoC Platform CI <ykjenk@marvell.com> Reviewed-by: Kostya Porotchkin <kostap@marvell.com> Reviewed-by: Omri Itach <omrii@marvell.com> Reviewed-by: Igal Liberman <igall@marvell.com>
Diffstat (limited to 'include')
-rw-r--r--include/plat/marvell/a8k/common/plat_marvell.h3
-rw-r--r--include/plat/marvell/a8k/common/plat_pm_trace.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/include/plat/marvell/a8k/common/plat_marvell.h b/include/plat/marvell/a8k/common/plat_marvell.h
index 1798563c..779c235b 100644
--- a/include/plat/marvell/a8k/common/plat_marvell.h
+++ b/include/plat/marvell/a8k/common/plat_marvell.h
@@ -102,6 +102,9 @@ void marvell_bl31_plat_arch_setup(void);
/* Power management config to power off the SoC */
void *plat_get_pm_cfg(void);
+/* Check if MSS AP CM3 firmware contains PM support */
+_Bool is_pm_fw_running(void);
+
/* Bootrom image recovery utility functions */
void *plat_get_skip_image_data(void);
diff --git a/include/plat/marvell/a8k/common/plat_pm_trace.h b/include/plat/marvell/a8k/common/plat_pm_trace.h
index 907fa5f8..c1b88707 100644
--- a/include/plat/marvell/a8k/common/plat_pm_trace.h
+++ b/include/plat/marvell/a8k/common/plat_pm_trace.h
@@ -96,7 +96,7 @@ struct pm_trace_ctrl {
#define TRACE_PWR_DOMAIN_ON_MASK (0xFF)
-#if defined(SCP_IMAGE) && defined(PM_TRACE_ENABLE)
+#ifdef PM_TRACE_ENABLE
/* trace API definition */
void pm_core_0_trace(unsigned int trace);