Lines Matching refs:cpu
40 void spm_enable_cpu_auto_off(int cluster, int cpu) in spm_enable_cpu_auto_off() argument
42 uintptr_t reg = per_cpu(cluster, cpu, MCUCFG_SPARK); in spm_enable_cpu_auto_off()
48 void spm_disable_cpu_auto_off(int cluster, int cpu) in spm_disable_cpu_auto_off() argument
50 uintptr_t reg = per_cpu(cluster, cpu, MCUCFG_SPARK); in spm_disable_cpu_auto_off()
56 void spm_set_cpu_power_off(int cluster, int cpu) in spm_set_cpu_power_off() argument
58 mmio_clrbits_32(per_cpu(cluster, cpu, SPM_CPU_PWR), PWRCTRL_PWR_ON); in spm_set_cpu_power_off()
73 void mcucfg_set_bootaddr(int cluster, int cpu, uintptr_t bootaddr) in mcucfg_set_bootaddr() argument
81 assert(cpu >= 0 && cpu < 4); in mcucfg_set_bootaddr()
82 reg = mp2_bootreg[cpu]; in mcucfg_set_bootaddr()
84 reg = per_cpu(cluster, cpu, MCUCFG_BOOTADDR); in mcucfg_set_bootaddr()
90 uintptr_t mcucfg_get_bootaddr(int cluster, int cpu) in mcucfg_get_bootaddr() argument
98 assert(cpu >= 0 && cpu < 4); in mcucfg_get_bootaddr()
99 reg = mp2_bootreg[cpu]; in mcucfg_get_bootaddr()
101 reg = per_cpu(cluster, cpu, MCUCFG_BOOTADDR); in mcucfg_get_bootaddr()
107 void mcucfg_init_archstate(int cluster, int cpu, int arm64) in mcucfg_init_archstate() argument
115 mmio_setbits_32(reg, (arm64 & 1) << (i + cpu)); in mcucfg_init_archstate()
141 int spm_get_cpu_powerstate(int cluster, int cpu) in spm_get_cpu_powerstate() argument
151 i = 1 << (i + cpu); in spm_get_cpu_powerstate()
203 void spm_poweron_cpu(int cluster, int cpu) in spm_poweron_cpu() argument
205 INFO("spmc: power on core %d.%d\n", cluster, cpu); in spm_poweron_cpu()
211 mmio_setbits_32(per_cpu(cluster, cpu, SPM_CPU_PWR), PWRCTRL_PWR_RST_B); in spm_poweron_cpu()
214 mmio_setbits_32(per_cpu(cluster, cpu, SPM_CPU_PWR), PWRCTRL_PWR_ON); in spm_poweron_cpu()
217 while (!spm_get_cpu_powerstate(cluster, cpu)) in spm_poweron_cpu()
221 INFO("spmc: power on core %d.%d successfully\n", cluster, cpu); in spm_poweron_cpu()
230 void spm_poweroff_cpu(int cluster, int cpu) in spm_poweroff_cpu() argument
232 INFO("spmc: power off core %d.%d\n", cluster, cpu); in spm_poweroff_cpu()
236 mmio_clrbits_32(per_cpu(cluster, cpu, SPM_CPU_PWR), PWRCTRL_PWR_ON_2ND); in spm_poweroff_cpu()
239 mmio_clrbits_32(per_cpu(cluster, cpu, SPM_CPU_PWR), PWRCTRL_PWR_ON); in spm_poweroff_cpu()
242 while (spm_get_cpu_powerstate(cluster, cpu)) in spm_poweroff_cpu()
246 mmio_clrbits_32(per_cpu(cluster, cpu, SPM_CPU_PWR), PWRCTRL_PWR_RST_B); in spm_poweroff_cpu()
249 INFO("spmc: power off core %d.%d successfully\n", cluster, cpu); in spm_poweroff_cpu()