Lines Matching defs:core
27 #define CPUIDLE_LOCK_ID(core) (0x6 - (core))
95 static void hisi_cpuhotplug_lock(unsigned int cluster, unsigned int core)
99 lock_id = (cluster << 2) + core;
104 static void hisi_cpuhotplug_unlock(unsigned int cluster, unsigned int core)
108 lock_id = (cluster << 2) + core;
114 void hisi_cpuidle_lock(unsigned int cluster, unsigned int core)
118 hisi_resource_lock(CPUIDLE_LOCK_ID(core), offset);
122 void hisi_cpuidle_unlock(unsigned int cluster, unsigned int core)
126 hisi_resource_unlock(CPUIDLE_LOCK_ID(core), offset);
139 void hisi_set_cpuidle_flag(unsigned int cluster, unsigned int core)
141 mmio_setbits_32(CPUIDLE_FLAG_REG(cluster), BIT(core));
144 void hisi_clear_cpuidle_flag(unsigned int cluster, unsigned int core)
146 mmio_clrbits_32(CPUIDLE_FLAG_REG(cluster), BIT(core));
166 unsigned int core, unsigned int value)
170 hisi_cpuhotplug_lock(cluster, core);
177 hisi_cpuhotplug_unlock(cluster, core);
180 unsigned int hisi_get_cpu_boot_flag(unsigned int cluster, unsigned int core)
184 hisi_cpuhotplug_lock(cluster, core);
188 hisi_cpuhotplug_unlock(cluster, core);
193 unsigned int hisi_test_cpu_down(unsigned int cluster, unsigned int core)
197 hisi_cpuhotplug_lock(cluster, core);
201 hisi_cpuhotplug_unlock(cluster, core);
209 void hisi_set_cpu_boot_flag(unsigned int cluster, unsigned int core)
211 unsigned int flag = BIT((cluster<<2) + core + 16);
213 hisi_cpuhotplug_lock(cluster, core);
217 hisi_cpuhotplug_unlock(cluster, core);
220 void hisi_clear_cpu_boot_flag(unsigned int cluster, unsigned int core)
222 unsigned int flag = BIT((cluster<<2) + core + 16);
224 hisi_cpuhotplug_lock(cluster, core);
228 hisi_cpuhotplug_unlock(cluster, core);
279 int hisi_test_pwrdn_allcores(unsigned int cluster, unsigned int core)
281 unsigned int mask = 0xf << (core * 4);
283 unsigned int boot_flag = hisi_get_cpu_boot_flag(cluster, core);
311 unsigned int core,
318 val |= BIT(core);
320 val &= ~BIT(core);
326 unsigned int core,
333 val |= BIT(core);
335 val &= ~BIT(core);
349 static void hisi_pdc_powerup_core(unsigned int cluster, unsigned int core,
356 BIT(core));
359 static void hisi_pdc_powerdn_core(unsigned int cluster, unsigned int core,
366 BIT(core));
369 void hisi_powerup_core(unsigned int cluster, unsigned int core)
371 hisi_pdc_powerup_core(cluster, core, PDC_MASK_GIC_WAKE_IRQ,
375 void hisi_powerdn_core(unsigned int cluster, unsigned int core)
377 hisi_pdc_powerdn_core(cluster, core, PDC_MASK_GIC_WAKE_IRQ,
381 void hisi_powerup_cluster(unsigned int cluster, unsigned int core)
383 hisi_ipc_pm_on_off(core, cluster, PM_ON);
386 void hisi_powerdn_cluster(unsigned int cluster, unsigned int core)
390 hisi_set_cluster_pwdn_flag(cluster, core, CLUSTER_PWDN_HOTPLUG);
392 (0x10001 << core));
394 BIT(core));
397 void hisi_enter_core_idle(unsigned int cluster, unsigned int core)
399 hisi_pdc_powerdn_core(cluster, core, PDC_UNMASK_GIC_WAKE_IRQ,
403 void hisi_enter_cluster_idle(unsigned int cluster, unsigned int core)
407 hisi_set_cluster_pwdn_flag(cluster, core, CLUSTER_PWDN_IDLE);
409 (0x10001 << core));
411 BIT(core));
414 void hisi_enter_ap_suspend(unsigned int cluster, unsigned int core)
416 hisi_ipc_pm_suspend(core, cluster, 0x3);