soc: intel_adsp: call framework callback function for restore
When exiting power gated state, call the CPU start function passed to arch_start_cpu(). Signed-off-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
2cdd44801e
commit
6a0b1da158
3 changed files with 17 additions and 0 deletions
|
@ -150,6 +150,7 @@ static ALWAYS_INLINE void _restore_core_context(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void dsp_restore_vector(void);
|
void dsp_restore_vector(void);
|
||||||
|
void mp_resume_entry(void);
|
||||||
|
|
||||||
void power_gate_entry(uint32_t core_id)
|
void power_gate_entry(uint32_t core_id)
|
||||||
{
|
{
|
||||||
|
@ -180,6 +181,11 @@ void power_gate_exit(void)
|
||||||
cpu_early_init();
|
cpu_early_init();
|
||||||
sys_cache_data_flush_and_invd_all();
|
sys_cache_data_flush_and_invd_all();
|
||||||
_restore_core_context();
|
_restore_core_context();
|
||||||
|
|
||||||
|
/* Secondary core is resumed by set_dx */
|
||||||
|
if (arch_proc_id()) {
|
||||||
|
mp_resume_entry();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__asm__(".align 4\n\t"
|
__asm__(".align 4\n\t"
|
||||||
|
|
|
@ -52,6 +52,7 @@ LOG_MODULE_REGISTER(soc);
|
||||||
* @biref FW entry point called by ROM during normal boot flow
|
* @biref FW entry point called by ROM during normal boot flow
|
||||||
*/
|
*/
|
||||||
extern void rom_entry(void);
|
extern void rom_entry(void);
|
||||||
|
void mp_resume_entry(void);
|
||||||
|
|
||||||
struct core_state {
|
struct core_state {
|
||||||
uint32_t a0;
|
uint32_t a0;
|
||||||
|
@ -104,6 +105,11 @@ void power_gate_exit(void)
|
||||||
cpu_early_init();
|
cpu_early_init();
|
||||||
sys_cache_data_flush_and_invd_all();
|
sys_cache_data_flush_and_invd_all();
|
||||||
_restore_core_context();
|
_restore_core_context();
|
||||||
|
|
||||||
|
/* Secondary core is resumed by set_dx */
|
||||||
|
if (arch_proc_id()) {
|
||||||
|
mp_resume_entry();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__asm__(".align 4\n\t"
|
__asm__(".align 4\n\t"
|
||||||
|
|
|
@ -110,6 +110,11 @@ __imr void z_mp_entry(void)
|
||||||
__ASSERT(false, "arch_start_cpu() handler should never return");
|
__ASSERT(false, "arch_start_cpu() handler should never return");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mp_resume_entry(void)
|
||||||
|
{
|
||||||
|
start_rec.fn(start_rec.arg);
|
||||||
|
}
|
||||||
|
|
||||||
bool arch_cpu_active(int cpu_num)
|
bool arch_cpu_active(int cpu_num)
|
||||||
{
|
{
|
||||||
return soc_cpus_active[cpu_num];
|
return soc_cpus_active[cpu_num];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue