Lines Matching defs:cluster

22 static void set_retention(int cluster, int tick)
26 if (cluster)
34 if (cluster)
40 void spm_enable_cpu_auto_off(int cluster, int cpu)
42 uintptr_t reg = per_cpu(cluster, cpu, MCUCFG_SPARK);
44 set_retention(cluster, 1);
48 void spm_disable_cpu_auto_off(int cluster, int cpu)
50 uintptr_t reg = per_cpu(cluster, cpu, MCUCFG_SPARK);
53 set_retention(cluster, 0);
56 void spm_set_cpu_power_off(int cluster, int cpu)
58 mmio_clrbits_32(per_cpu(cluster, cpu, SPM_CPU_PWR), PWRCTRL_PWR_ON);
61 void spm_enable_cluster_auto_off(int cluster)
63 assert(cluster);
70 mmio_clrbits_32(per_cluster(cluster, SPM_CLUSTER_PWR), PWRCTRL_PWR_ON);
73 void mcucfg_set_bootaddr(int cluster, int cpu, uintptr_t bootaddr)
80 if (cluster) {
84 reg = per_cpu(cluster, cpu, MCUCFG_BOOTADDR);
90 uintptr_t mcucfg_get_bootaddr(int cluster, int cpu)
97 if (cluster) {
101 reg = per_cpu(cluster, cpu, MCUCFG_BOOTADDR);
107 void mcucfg_init_archstate(int cluster, int cpu, int arm64)
112 reg = per_cluster(cluster, MCUCFG_INITARCH);
113 i = cluster ? 16 : 12;
132 int spm_get_cluster_powerstate(int cluster)
136 mask = cluster ? PWR_STATUS_MP1_CPUTOP : PWR_STATUS_MP0_CPUTOP;
141 int spm_get_cpu_powerstate(int cluster, int cpu)
150 i = (cluster) ? 16 : 9;
198 * Power on a core with specified cluster and core index
200 * @cluster: the cluster ID of the CPU which to be powered on
203 void spm_poweron_cpu(int cluster, int cpu)
205 INFO("spmc: power on core %d.%d\n", cluster, cpu);
211 mmio_setbits_32(per_cpu(cluster, cpu, SPM_CPU_PWR), PWRCTRL_PWR_RST_B);
214 mmio_setbits_32(per_cpu(cluster, cpu, SPM_CPU_PWR), PWRCTRL_PWR_ON);
217 while (!spm_get_cpu_powerstate(cluster, cpu))
221 INFO("spmc: power on core %d.%d successfully\n", cluster, cpu);
225 * Power off a core with specified cluster and core index
227 * @cluster: the cluster ID of the CPU which to be powered off
230 void spm_poweroff_cpu(int cluster, int cpu)
232 INFO("spmc: power off core %d.%d\n", cluster, cpu);
236 mmio_clrbits_32(per_cpu(cluster, cpu, SPM_CPU_PWR), PWRCTRL_PWR_ON_2ND);
239 mmio_clrbits_32(per_cpu(cluster, cpu, SPM_CPU_PWR), PWRCTRL_PWR_ON);
242 while (spm_get_cpu_powerstate(cluster, cpu))
246 mmio_clrbits_32(per_cpu(cluster, cpu, SPM_CPU_PWR), PWRCTRL_PWR_RST_B);
249 INFO("spmc: power off core %d.%d successfully\n", cluster, cpu);
253 * Power off a cluster with specified index
255 * @cluster: the cluster index which to be powered off
257 void spm_poweroff_cluster(int cluster)
262 INFO("spmc: power off cluster %d\n", cluster);
266 mask = (cluster) ? MP1_CPUTOP_PROT_STEP1_0_MASK :
274 mmio_clrbits_32(per_cluster(cluster, SPM_CLUSTER_PWR),
278 mask = (cluster) ? MP1_SPMC_SRAM_DORMANT_EN : MP0_SPMC_SRAM_DORMANT_EN;
282 mmio_clrbits_32(per_cluster(cluster, SPM_CLUSTER_PWR), PWRCTRL_PWR_ON);
285 while (spm_get_cluster_powerstate(cluster))
289 * Following flow only for BIG core cluster. It was from
292 if (cluster) {
299 if (cluster)
303 INFO("spmc: power off cluster %d successfully\n", cluster);
307 * Power on a cluster with specified index
309 * @cluster: the cluster index which to be powered on
311 void spm_poweron_cluster(int cluster)
316 INFO("spmc: power on cluster %d\n", cluster);
321 * Following flow only for BIG core cluster. It was from
324 if (cluster) {
332 * Following flow only for BIG core cluster. It was from
341 mmio_clrbits_32(per_cluster(cluster, SPM_CLUSTER_PWR),
345 mmio_setbits_32(per_cluster(cluster, SPM_CLUSTER_PWR),
349 mmio_clrbits_32(per_cluster(cluster, SPM_CLUSTER_PWR),
353 mmio_setbits_32(per_cluster(cluster, SPM_CLUSTER_PWR), PWRCTRL_PWR_ON);
356 while (!spm_get_cluster_powerstate(cluster))
360 mask = (cluster) ? MP1_CPUTOP_PROT_STEP1_0_MASK :
365 INFO("spmc: power on cluster %d successfully\n", cluster);