Unverified Commit 08c2f264 authored by Dimitris Papastamos's avatar Dimitris Papastamos Committed by GitHub
Browse files

Merge pull request #1452 from glneo/fixups-for-k3

Couple of fixups for K3 platform
parents d5a0491c deed2b83
...@@ -17,12 +17,18 @@ uintptr_t k3_sec_entrypoint; ...@@ -17,12 +17,18 @@ uintptr_t k3_sec_entrypoint;
static void k3_cpu_standby(plat_local_state_t cpu_state) static void k3_cpu_standby(plat_local_state_t cpu_state)
{ {
/* unsigned int scr;
* Enter standby state
* dsb is good practice before using wfi to enter low power states scr = read_scr_el3();
*/ /* Enable the Non secure interrupt to wake the CPU */
write_scr_el3(scr | SCR_IRQ_BIT | SCR_FIQ_BIT);
isb();
/* dsb is good practice before using wfi to enter low power states */
dsb(); dsb();
/* Enter standby state */
wfi(); wfi();
/* Restore SCR */
write_scr_el3(scr);
} }
static int k3_pwr_domain_on(u_register_t mpidr) static int k3_pwr_domain_on(u_register_t mpidr)
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
/* The power domain tree descriptor */ /* The power domain tree descriptor */
static unsigned char power_domain_tree_desc[] = { static unsigned char power_domain_tree_desc[] = {
PLATFORM_SYSTEM_COUNT,
PLATFORM_CLUSTER_COUNT, PLATFORM_CLUSTER_COUNT,
K3_CLUSTER0_CORE_COUNT, K3_CLUSTER0_CORE_COUNT,
#if K3_CLUSTER1_MSMC_PORT != UNUSED #if K3_CLUSTER1_MSMC_PORT != UNUSED
......
...@@ -62,9 +62,10 @@ ...@@ -62,9 +62,10 @@
#define PLATFORM_CLUSTER_OFFSET K3_CLUSTER0_MSMC_PORT #define PLATFORM_CLUSTER_OFFSET K3_CLUSTER0_MSMC_PORT
#define PLAT_NUM_PWR_DOMAINS (PLATFORM_CLUSTER_COUNT + \ #define PLAT_NUM_PWR_DOMAINS (PLATFORM_SYSTEM_COUNT + \
PLATFORM_CLUSTER_COUNT + \
PLATFORM_CORE_COUNT) PLATFORM_CORE_COUNT)
#define PLAT_MAX_PWR_LVL MPIDR_AFFLVL1 #define PLAT_MAX_PWR_LVL MPIDR_AFFLVL2
/******************************************************************************* /*******************************************************************************
* Memory layout constants * Memory layout constants
......
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