Commit 4694e1e7 authored by Manish Pandey's avatar Manish Pandey Committed by TrustedFirmware Code Review
Browse files

Merge "uniphier: call uniphier_scp_is_running() only when on-chip STM is...

Merge "uniphier: call uniphier_scp_is_running() only when on-chip STM is supported" into integration
parents bc3579b7 ecd138df
...@@ -60,6 +60,7 @@ BL31_SOURCES += drivers/arm/cci/cci.c \ ...@@ -60,6 +60,7 @@ BL31_SOURCES += drivers/arm/cci/cci.c \
plat/common/plat_gicv3.c \ plat/common/plat_gicv3.c \
plat/common/plat_psci_common.c \ plat/common/plat_psci_common.c \
$(PLAT_PATH)/uniphier_bl31_setup.c \ $(PLAT_PATH)/uniphier_bl31_setup.c \
$(PLAT_PATH)/uniphier_boot_device.c \
$(PLAT_PATH)/uniphier_cci.c \ $(PLAT_PATH)/uniphier_cci.c \
$(PLAT_PATH)/uniphier_gicv3.c \ $(PLAT_PATH)/uniphier_gicv3.c \
$(PLAT_PATH)/uniphier_psci.c \ $(PLAT_PATH)/uniphier_psci.c \
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <arch_helpers.h> #include <arch_helpers.h>
#include <common/debug.h> #include <common/debug.h>
#include <errno.h>
#include <lib/mmio.h> #include <lib/mmio.h>
#include <lib/psci/psci.h> #include <lib/psci/psci.h>
...@@ -113,16 +114,26 @@ static const struct plat_psci_ops uniphier_psci_ops = { ...@@ -113,16 +114,26 @@ static const struct plat_psci_ops uniphier_psci_ops = {
int plat_setup_psci_ops(uintptr_t sec_entrypoint, int plat_setup_psci_ops(uintptr_t sec_entrypoint,
const struct plat_psci_ops **psci_ops) const struct plat_psci_ops **psci_ops)
{ {
uniphier_sec_entrypoint = sec_entrypoint; unsigned int soc;
flush_dcache_range((uint64_t)&uniphier_sec_entrypoint,
sizeof(uniphier_sec_entrypoint)); soc = uniphier_get_soc_id();
if (soc == UNIPHIER_SOC_UNKNOWN) {
ERROR("unsupported SoC\n");
return -ENOTSUP;
}
if (uniphier_get_boot_master(soc) == UNIPHIER_BOOT_MASTER_SCP) {
uniphier_psci_scp_mode = uniphier_scp_is_running(); uniphier_psci_scp_mode = uniphier_scp_is_running();
flush_dcache_range((uint64_t)&uniphier_psci_scp_mode, flush_dcache_range((uint64_t)&uniphier_psci_scp_mode,
sizeof(uniphier_psci_scp_mode)); sizeof(uniphier_psci_scp_mode));
if (uniphier_psci_scp_mode) if (uniphier_psci_scp_mode)
uniphier_scp_open_com(); uniphier_scp_open_com();
}
uniphier_sec_entrypoint = sec_entrypoint;
flush_dcache_range((uint64_t)&uniphier_sec_entrypoint,
sizeof(uniphier_sec_entrypoint));
*psci_ops = &uniphier_psci_ops; *psci_ops = &uniphier_psci_ops;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment