Commit ff180993 authored by Andrew F. Davis's avatar Andrew F. Davis
Browse files

ti: k3: common: Mark sections for AM65x coherency workaround



These sections of code are only needed for the coherency workaround
used for AM65x, if this workaround is not needed then this code
is not either. Mark it off to keep it separated from the rest of
the PSCI implementation.
Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
Change-Id: I113ca6a2a1f7881814ab0a64e5bac57139bc03ef
parent ebfb0709
...@@ -17,8 +17,10 @@ ...@@ -17,8 +17,10 @@
#include <k3_gicv3.h> #include <k3_gicv3.h>
#include <ti_sci.h> #include <ti_sci.h>
#ifdef TI_AM65X_WORKAROUND
/* Need to flush psci internal locks before shutdown or their values are lost */ /* Need to flush psci internal locks before shutdown or their values are lost */
#include "../../../../lib/psci/psci_private.h" #include "../../../../lib/psci/psci_private.h"
#endif
uintptr_t k3_sec_entrypoint; uintptr_t k3_sec_entrypoint;
...@@ -113,6 +115,7 @@ void k3_pwr_domain_on_finish(const psci_power_state_t *target_state) ...@@ -113,6 +115,7 @@ void k3_pwr_domain_on_finish(const psci_power_state_t *target_state)
k3_gic_cpuif_enable(); k3_gic_cpuif_enable();
} }
#ifdef TI_AM65X_WORKAROUND
static void __dead2 k3_pwr_domain_pwr_down_wfi(const psci_power_state_t static void __dead2 k3_pwr_domain_pwr_down_wfi(const psci_power_state_t
*target_state) *target_state)
{ {
...@@ -120,6 +123,7 @@ static void __dead2 k3_pwr_domain_pwr_down_wfi(const psci_power_state_t ...@@ -120,6 +123,7 @@ static void __dead2 k3_pwr_domain_pwr_down_wfi(const psci_power_state_t
flush_dcache_range((uintptr_t) psci_locks, sizeof(psci_locks)); flush_dcache_range((uintptr_t) psci_locks, sizeof(psci_locks));
psci_power_down_wfi(); psci_power_down_wfi();
} }
#endif
static void __dead2 k3_system_reset(void) static void __dead2 k3_system_reset(void)
{ {
...@@ -150,7 +154,9 @@ static const plat_psci_ops_t k3_plat_psci_ops = { ...@@ -150,7 +154,9 @@ static const plat_psci_ops_t k3_plat_psci_ops = {
.pwr_domain_on = k3_pwr_domain_on, .pwr_domain_on = k3_pwr_domain_on,
.pwr_domain_off = k3_pwr_domain_off, .pwr_domain_off = k3_pwr_domain_off,
.pwr_domain_on_finish = k3_pwr_domain_on_finish, .pwr_domain_on_finish = k3_pwr_domain_on_finish,
#ifdef TI_AM65X_WORKAROUND
.pwr_domain_pwr_down_wfi = k3_pwr_domain_pwr_down_wfi, .pwr_domain_pwr_down_wfi = k3_pwr_domain_pwr_down_wfi,
#endif
.system_reset = k3_system_reset, .system_reset = k3_system_reset,
.validate_power_state = k3_validate_power_state, .validate_power_state = k3_validate_power_state,
.validate_ns_entrypoint = k3_validate_ns_entrypoint .validate_ns_entrypoint = k3_validate_ns_entrypoint
......
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