Lines Matching full:cluster

50 /* SPC CPU/cluster reset statue */
71 /* TC2 static dual-cluster configuration */
97 * A15s cluster identifier
111 static inline bool cluster_is_a15(u32 cluster) in cluster_is_a15() argument
113 return cluster == info->a15_clusid; in cluster_is_a15()
142 * @cluster: mpidr[15:8] bitfield describing cluster affinity level
150 void ve_spc_cpu_wakeup_irq(u32 cluster, u32 cpu, bool set) in ve_spc_cpu_wakeup_irq() argument
154 if (cluster >= MAX_CLUSTERS) in ve_spc_cpu_wakeup_irq()
159 if (!cluster_is_a15(cluster)) in ve_spc_cpu_wakeup_irq()
175 * @cluster: mpidr[15:8] bitfield describing cluster affinity level
179 void ve_spc_set_resume_addr(u32 cluster, u32 cpu, u32 addr) in ve_spc_set_resume_addr() argument
183 if (cluster >= MAX_CLUSTERS) in ve_spc_set_resume_addr()
186 if (cluster_is_a15(cluster)) in ve_spc_set_resume_addr()
195 * ve_spc_powerdown() - enables/disables cluster powerdown
197 * @cluster: mpidr[15:8] bitfield describing cluster affinity level
200 * Function to enable/disable cluster powerdown. Not protected by locking
204 void ve_spc_powerdown(u32 cluster, bool enable) in ve_spc_powerdown() argument
208 if (cluster >= MAX_CLUSTERS) in ve_spc_powerdown()
211 pwdrn_reg = cluster_is_a15(cluster) ? A15_PWRDN_EN : A7_PWRDN_EN; in ve_spc_powerdown()
215 static u32 standbywfi_cpu_mask(u32 cpu, u32 cluster) in standbywfi_cpu_mask() argument
217 return cluster_is_a15(cluster) ? in standbywfi_cpu_mask()
225 * @cpu: mpidr[7:0] bitfield describing CPU affinity level within cluster
226 * @cluster: mpidr[15:8] bitfield describing cluster affinity level
234 int ve_spc_cpu_in_wfi(u32 cpu, u32 cluster) in ve_spc_cpu_in_wfi() argument
237 u32 mask = standbywfi_cpu_mask(cpu, cluster); in ve_spc_cpu_in_wfi()
239 if (cluster >= MAX_CLUSTERS) in ve_spc_cpu_in_wfi()
250 static int ve_spc_get_performance(int cluster, u32 *freq) in ve_spc_get_performance() argument
252 struct ve_spc_opp *opps = info->opps[cluster]; in ve_spc_get_performance()
256 perf_cfg_reg = cluster_is_a15(cluster) ? PERF_LVL_A15 : PERF_LVL_A7; in ve_spc_get_performance()
259 if (perf >= info->num_opps[cluster]) in ve_spc_get_performance()
269 static int ve_spc_round_performance(int cluster, u32 freq) in ve_spc_round_performance() argument
271 int idx, max_opp = info->num_opps[cluster]; in ve_spc_round_performance()
272 struct ve_spc_opp *opps = info->opps[cluster]; in ve_spc_round_performance()
292 static int ve_spc_find_performance_index(int cluster, u32 freq) in ve_spc_find_performance_index() argument
294 int idx, max_opp = info->num_opps[cluster]; in ve_spc_find_performance_index()
295 struct ve_spc_opp *opps = info->opps[cluster]; in ve_spc_find_performance_index()
314 static int ve_spc_set_performance(int cluster, u32 freq) in ve_spc_set_performance() argument
319 if (cluster_is_a15(cluster)) { in ve_spc_set_performance()
327 perf = ve_spc_find_performance_index(cluster, freq); in ve_spc_set_performance()
393 static int ve_spc_populate_opps(uint32_t cluster) in ve_spc_populate_opps() argument
402 info->opps[cluster] = opps; in ve_spc_populate_opps()
404 off = cluster_is_a15(cluster) ? A15_PERFVAL_BASE : A7_PERFVAL_BASE; in ve_spc_populate_opps()
414 info->num_opps[cluster] = idx; in ve_spc_populate_opps()
421 int cluster; in ve_init_opp_table() local
425 cluster = topology_physical_package_id(cpu_dev->id); in ve_init_opp_table()
426 cluster = cluster < 0 ? 0 : cluster; in ve_init_opp_table()
428 max_opp = info->num_opps[cluster]; in ve_init_opp_table()
429 opps = info->opps[cluster]; in ve_init_opp_table()
472 * Multi-cluster systems may need this data when non-coherent, during in ve_spc_init()
473 * cluster power-up/power-down. Make sure driver info reaches main in ve_spc_init()
484 int cluster; member
494 if (ve_spc_get_performance(spc->cluster, &freq)) in spc_recalc_rate()
505 return ve_spc_round_performance(spc->cluster, drate); in spc_round_rate()
513 return ve_spc_set_performance(spc->cluster, rate / 1000); in spc_set_rate()
532 spc->cluster = topology_physical_package_id(cpu_dev->id); in ve_spc_clk_register()
534 spc->cluster = spc->cluster < 0 ? 0 : spc->cluster; in ve_spc_clk_register()
546 int cpu, cluster; in ve_spc_clk_init() local
574 cluster = topology_physical_package_id(cpu_dev->id); in ve_spc_clk_init()
575 if (cluster < 0 || init_opp_table[cluster]) in ve_spc_clk_init()
584 init_opp_table[cluster] = true; in ve_spc_clk_init()