| /rk3399_ARM-atf/plat/allwinner/common/ |
| H A D | sunxi_cpu_ops.c | 28 static void sunxi_cpu_disable_power(unsigned int cluster, unsigned int core) in sunxi_cpu_disable_power() argument 30 if (mmio_read_32(SUNXI_CPU_POWER_CLAMP_REG(cluster, core)) == 0xff) in sunxi_cpu_disable_power() 33 VERBOSE("PSCI: Disabling power to cluster %d core %d\n", cluster, core); in sunxi_cpu_disable_power() 35 mmio_write_32(SUNXI_CPU_POWER_CLAMP_REG(cluster, core), 0xff); in sunxi_cpu_disable_power() 38 static void sunxi_cpu_enable_power(unsigned int cluster, unsigned int core) in sunxi_cpu_enable_power() argument 40 if (mmio_read_32(SUNXI_CPU_POWER_CLAMP_REG(cluster, core)) == 0) in sunxi_cpu_enable_power() 43 VERBOSE("PSCI: Enabling power to cluster %d core %d\n", cluster, core); in sunxi_cpu_enable_power() 46 mmio_write_32(SUNXI_CPU_POWER_CLAMP_REG(cluster, core), 0xfe); in sunxi_cpu_enable_power() 47 mmio_write_32(SUNXI_CPU_POWER_CLAMP_REG(cluster, core), 0xf8); in sunxi_cpu_enable_power() 48 mmio_write_32(SUNXI_CPU_POWER_CLAMP_REG(cluster, core), 0xe0); in sunxi_cpu_enable_power() [all …]
|
| H A D | arisc_off.S | 6 # OpenRISC assembly to turn off an ARM core on an Allwinner SoC from 18 # very ARM core to be turned off. 19 # It expects the core number presented as a mask in the upper half of 25 # - Loop until the core in question reaches WFI. 26 # - Using that mask, activate the core output clamps by setting the 27 # respective core bit in CPUX_PWROFF_GATING_REG (0x1f01500). 28 # Note that the clamp for core 0 covers more than just the core, activating 29 # it hangs the whole system. So we skip this step for core 0. 30 # - Using the negated mask, assert the core's reset line by clearing the 58 l.bf 1f # don't touch the bit for core 0 [all …]
|
| H A D | sunxi_topology.c | 24 unsigned int core = MPIDR_AFFLVL0_VAL(mpidr); in plat_core_pos_by_mpidr() local 29 core >= PLATFORM_MAX_CPUS_PER_CLUSTER) { in plat_core_pos_by_mpidr() 33 return cluster * PLATFORM_MAX_CPUS_PER_CLUSTER + core; in plat_core_pos_by_mpidr()
|
| /rk3399_ARM-atf/plat/hisilicon/hikey960/drivers/pwrc/ |
| H A D | hisi_pwrc.c | 27 #define CPUIDLE_LOCK_ID(core) (0x6 - (core)) argument 95 static void hisi_cpuhotplug_lock(unsigned int cluster, unsigned int core) in hisi_cpuhotplug_lock() argument 99 lock_id = (cluster << 2) + core; in hisi_cpuhotplug_lock() 104 static void hisi_cpuhotplug_unlock(unsigned int cluster, unsigned int core) in hisi_cpuhotplug_unlock() argument 108 lock_id = (cluster << 2) + core; in hisi_cpuhotplug_unlock() 114 void hisi_cpuidle_lock(unsigned int cluster, unsigned int core) in hisi_cpuidle_lock() argument 118 hisi_resource_lock(CPUIDLE_LOCK_ID(core), offset); in hisi_cpuidle_lock() 122 void hisi_cpuidle_unlock(unsigned int cluster, unsigned int core) in hisi_cpuidle_unlock() argument 126 hisi_resource_unlock(CPUIDLE_LOCK_ID(core), offset); in hisi_cpuidle_unlock() 139 void hisi_set_cpuidle_flag(unsigned int cluster, unsigned int core) in hisi_set_cpuidle_flag() argument [all …]
|
| H A D | hisi_pwrc.h | 33 void hisi_cpuidle_lock(unsigned int cluster, unsigned int core); 34 void hisi_cpuidle_unlock(unsigned int cluster, unsigned int core); 35 void hisi_set_cpuidle_flag(unsigned int cluster, unsigned int core); 36 void hisi_clear_cpuidle_flag(unsigned int cluster, unsigned int core); 37 void hisi_set_cpu_boot_flag(unsigned int cluster, unsigned int core); 38 void hisi_clear_cpu_boot_flag(unsigned int cluster, unsigned int core); 40 void hisi_enter_core_idle(unsigned int cluster, unsigned int core); 41 void hisi_enter_cluster_idle(unsigned int cluster, unsigned int core); 43 void hisi_enter_ap_suspend(unsigned int cluster, unsigned int core); 48 int hisi_test_pwrdn_allcores(unsigned int cluster, unsigned int core); [all …]
|
| /rk3399_ARM-atf/plat/mediatek/mt8192/drivers/ptp3/ |
| H A D | mtk_ptp3_main.c | 38 void ptp3_init(unsigned int core) in ptp3_init() argument 43 if (core < NR_PTP3_CFG1_CPU) { in ptp3_init() 46 ptp3_cfg1[core][PTP3_CFG_ADDR], in ptp3_init() 47 ptp3_cfg1[core][PTP3_CFG_VALUE]); in ptp3_init() 51 if (core >= PTP3_CFG2_CPU_START_ID) { in ptp3_init() 52 _core = core - PTP3_CFG2_CPU_START_ID; in ptp3_init() 63 if (core >= PTP3_CFG3_CPU_START_ID) { in ptp3_init() 64 _core = core - PTP3_CFG3_CPU_START_ID; in ptp3_init() 75 void ptp3_deinit(unsigned int core) in ptp3_deinit() argument 77 if (core < NR_PTP3_CFG1_CPU) { in ptp3_deinit() [all …]
|
| /rk3399_ARM-atf/plat/hisilicon/hikey960/ |
| H A D | hikey960_pm.c | 64 unsigned int core = mpidr & MPIDR_CPU_MASK; in hikey960_pwr_domain_on() local 69 hisi_set_cpu_boot_flag(cluster, core); in hikey960_pwr_domain_on() 71 mmio_write_32(CRG_REG_BASE + CRG_RVBAR(cluster, core), in hikey960_pwr_domain_on() 75 hisi_powerup_core(cluster, core); in hikey960_pwr_domain_on() 77 hisi_powerup_cluster(cluster, core); in hikey960_pwr_domain_on() 95 unsigned int core = mpidr & MPIDR_CPU_MASK; in hikey960_pwr_domain_off() local 105 hisi_clear_cpu_boot_flag(cluster, core); in hikey960_pwr_domain_off() 106 hisi_powerdn_core(cluster, core); in hikey960_pwr_domain_off() 109 if (hisi_test_cpu_down(cluster, core)) { in hikey960_pwr_domain_off() 116 hisi_powerdn_cluster(cluster, core); in hikey960_pwr_domain_off() [all …]
|
| /rk3399_ARM-atf/plat/mediatek/drivers/ptp3/ |
| H A D | ptp3_common.c | 13 #define PTP3_CORE_OFT(core) (0x800 * (core)) argument 15 static void ptp3_init(unsigned int core) in ptp3_init() argument 19 if (core < PTP3_CFG_CPU_START_ID_B) { in ptp3_init() 27 if (core < PTP3_CFG_CPU_START_ID_B) { in ptp3_init() 29 addr = ptp3_cfg2[i][PTP3_CFG_ADDR] + PTP3_CORE_OFT(core); in ptp3_init() 36 addr = ptp3_cfg2[i][PTP3_CFG_ADDR] + PTP3_CORE_OFT(core); in ptp3_init() 47 if (core < PTP3_CFG_CPU_START_ID_B) { in ptp3_init() 48 addr = ptp3_cfg3[PTP3_CFG_ADDR] + PTP3_CORE_OFT(core); in ptp3_init() 51 addr = ptp3_cfg3_ext[PTP3_CFG_ADDR] + PTP3_CORE_OFT(core); in ptp3_init() 81 void ptp3_core_init(unsigned int core) in ptp3_core_init() argument [all …]
|
| H A D | ptp3_common.h | 18 void ptp3_core_init(unsigned int core); 19 void ptp3_core_deinit(unsigned int core);
|
| /rk3399_ARM-atf/plat/amlogic/gxl/ |
| H A D | gxl_pm.c | 32 unsigned int core = plat_calc_core_pos(mpidr); in gxl_pm_set_reset_addr() local 33 uintptr_t cpu_mailbox_addr = AML_PSCI_MAILBOX_BASE + (core << 4); in gxl_pm_set_reset_addr() 40 unsigned int core = plat_calc_core_pos(mpidr); in gxl_pm_reset() local 41 uintptr_t cpu_mailbox_addr = AML_PSCI_MAILBOX_BASE + (core << 4) + 8; in gxl_pm_reset() 102 unsigned int core = plat_calc_core_pos(mpidr); in gxl_pwr_domain_on() local 105 if (core == AML_PRIMARY_CPU) { in gxl_pwr_domain_on() 130 unsigned int core = plat_calc_core_pos(read_mpidr_el1()); in gxl_pwr_domain_on_finish() local 135 if (core == AML_PRIMARY_CPU) { in gxl_pwr_domain_on_finish() 150 unsigned int core = plat_calc_core_pos(mpidr); in gxl_pwr_domain_off() local 155 if (core == AML_PRIMARY_CPU) in gxl_pwr_domain_off() [all …]
|
| /rk3399_ARM-atf/plat/amlogic/g12a/ |
| H A D | g12a_pm.c | 32 unsigned int core = plat_calc_core_pos(mpidr); in g12a_pm_set_reset_addr() local 33 uintptr_t cpu_mailbox_addr = AML_PSCI_MAILBOX_BASE + (core << 4); in g12a_pm_set_reset_addr() 40 unsigned int core = plat_calc_core_pos(mpidr); in g12a_pm_reset() local 41 uintptr_t cpu_mailbox_addr = AML_PSCI_MAILBOX_BASE + (core << 4) + 8; in g12a_pm_reset() 102 unsigned int core = plat_calc_core_pos(mpidr); in g12a_pwr_domain_on() local 105 if (core == AML_PRIMARY_CPU) { in g12a_pwr_domain_on() 130 unsigned int core = plat_calc_core_pos(read_mpidr_el1()); in g12a_pwr_domain_on_finish() local 135 if (core == AML_PRIMARY_CPU) { in g12a_pwr_domain_on_finish() 150 unsigned int core = plat_calc_core_pos(mpidr); in g12a_pwr_domain_off() local 155 if (core == AML_PRIMARY_CPU) in g12a_pwr_domain_off() [all …]
|
| /rk3399_ARM-atf/plat/amlogic/gxbb/ |
| H A D | gxbb_pm.c | 32 unsigned int core = plat_calc_core_pos(mpidr); in gxbb_program_mailbox() local 33 uintptr_t cpu_mailbox_addr = AML_PSCI_MAILBOX_BASE + (core << 4); in gxbb_program_mailbox() 87 unsigned int core = plat_calc_core_pos(mpidr); in gxbb_pwr_domain_on() local 90 if (core == AML_PRIMARY_CPU) { in gxbb_pwr_domain_on() 114 unsigned int core = plat_calc_core_pos(read_mpidr_el1()); in gxbb_pwr_domain_on_finish() local 119 if (core == AML_PRIMARY_CPU) { in gxbb_pwr_domain_on_finish() 133 unsigned int core = plat_calc_core_pos(mpidr); in gxbb_pwr_domain_off() local 134 uintptr_t addr = AML_PSCI_MAILBOX_BASE + 8 + (core << 4); in gxbb_pwr_domain_off() 142 if (core == AML_PRIMARY_CPU) in gxbb_pwr_domain_off() 152 unsigned int core = plat_calc_core_pos(read_mpidr_el1()); in gxbb_pwr_domain_pwr_down_wfi() local [all …]
|
| /rk3399_ARM-atf/plat/ti/k3/common/ |
| H A D | k3_topology.c | 29 unsigned int core = MPIDR_AFFLVL0_VAL(mpidr); in plat_core_pos_by_mpidr() local 37 core += K3_CLUSTER0_CORE_COUNT; in plat_core_pos_by_mpidr() 39 core += K3_CLUSTER1_CORE_COUNT; in plat_core_pos_by_mpidr() 41 core += K3_CLUSTER2_CORE_COUNT; in plat_core_pos_by_mpidr() 45 return core; in plat_core_pos_by_mpidr()
|
| H A D | k3_psci.c | 44 int core, proc_id, device_id, ret; in k3_pwr_domain_on() local 46 core = plat_core_pos_by_mpidr(mpidr); in k3_pwr_domain_on() 47 if (core < 0) { in k3_pwr_domain_on() 48 ERROR("Could not get target core id: %d\n", core); in k3_pwr_domain_on() 52 proc_id = PLAT_PROC_START_ID + core; in k3_pwr_domain_on() 53 device_id = PLAT_PROC_DEVICE_START_ID + core; in k3_pwr_domain_on() 88 int core, cluster, proc_id, device_id, cluster_id, ret; in k3_pwr_domain_off() local 96 core = plat_my_core_pos(); in k3_pwr_domain_off() 98 proc_id = PLAT_PROC_START_ID + core; in k3_pwr_domain_off() 99 device_id = PLAT_PROC_DEVICE_START_ID + core; in k3_pwr_domain_off() [all …]
|
| /rk3399_ARM-atf/plat/hisilicon/hikey960/include/ |
| H A D | hisi_ipc.h | 15 void hisi_ipc_pm_on_off(unsigned int core, unsigned int cluster, 17 void hisi_ipc_pm_suspend(unsigned int core, unsigned int cluster, 19 void hisi_ipc_psci_system_off(unsigned int core, unsigned int cluster); 20 void hisi_ipc_psci_system_reset(unsigned int core, unsigned int cluster,
|
| /rk3399_ARM-atf/plat/mediatek/drivers/cpu_pm/cpcv3_2/ |
| H A D | mt_cpu_pm.h | 43 #define SPM_VLP_CPU_PWR_CON(core) (SPM_BASE + 0x268 + ((core) * 4)) argument 45 #define SPM_VLP_CPU_PWR_CON(core) 0 argument 48 #define PER_CPU_PWR_DATA(ctrl, cluster, core) \ argument 50 ctrl.rvbaraddr_l = CORE_RVBRADDR_##cluster##_##core##_L; \ 52 ctrl.pwpr = SPM_MP##cluster##_CPU##core##_PWR_CON; \ 53 ctrl.pwpr_intermediate = SPM_VLP_CPU_PWR_CON(core); \
|
| /rk3399_ARM-atf/drivers/arm/ethosn/ |
| H A D | ethosn_smc.c | 131 const struct ethosn_core_t *core = &(dev->cores[core_idx]); in ethosn_get_device_and_core() local 133 if (core->addr == core_addr) { in ethosn_get_device_and_core() 135 *core_match = core; in ethosn_get_device_and_core() 154 static void ethosn_configure_stream_nsaid(const struct ethosn_core_t *core, in ethosn_configure_stream_nsaid() argument 180 mmio_write_32(ETHOSN_CORE_SEC_REG(core->addr, reg_addr), in ethosn_configure_stream_nsaid() 223 const struct ethosn_core_t *core, in ethosn_configure_smmu_streams() argument 227 &(core->main_allocator); in ethosn_configure_smmu_streams() 246 mmio_write_32(ETHOSN_CORE_SEC_REG(core->addr, reg_addr), in ethosn_configure_smmu_streams() 370 const struct ethosn_core_t *core, in ethosn_core_full_reset() argument 382 if (!ethosn_core_reset(core->addr, hard_reset)) { in ethosn_core_full_reset() [all …]
|
| /rk3399_ARM-atf/plat/hisilicon/hikey960/drivers/ipc/ |
| H A D | hisi_ipc.c | 133 void hisi_ipc_pm_on_off(unsigned int core, unsigned int cluster, in hisi_ipc_pm_on_off() argument 139 enum lpm3_mbox_id mailbox = (enum lpm3_mbox_id)(LPM3_MBX0 + core); in hisi_ipc_pm_on_off() 142 cmdpara = IPC_CMD_PARA(0, core); in hisi_ipc_pm_on_off() 147 void hisi_ipc_pm_suspend(unsigned int core, unsigned int cluster, in hisi_ipc_pm_suspend() argument 153 enum lpm3_mbox_id mailbox = (enum lpm3_mbox_id)(LPM3_MBX0 + core); in hisi_ipc_pm_suspend() 160 cmdpara = IPC_CMD_PARA(1, core); in hisi_ipc_pm_suspend() 165 void hisi_ipc_psci_system_off(unsigned int core, unsigned int cluster) in hisi_ipc_psci_system_off() argument 170 enum lpm3_mbox_id mailbox = (enum lpm3_mbox_id)(LPM3_MBX0 + core); in hisi_ipc_psci_system_off() 178 void hisi_ipc_psci_system_reset(unsigned int core, unsigned int cluster, in hisi_ipc_psci_system_reset() argument 184 enum lpm3_mbox_id mailbox = (enum lpm3_mbox_id)(LPM3_MBX0 + core); in hisi_ipc_psci_system_reset()
|
| /rk3399_ARM-atf/plat/ti/k3low/common/ |
| H A D | am62l_psci.c | 29 int32_t core, ret; in am62l_pwr_domain_on() local 32 core = plat_core_pos_by_mpidr(mpidr); in am62l_pwr_domain_on() 33 if (core < 0) { in am62l_pwr_domain_on() 34 ERROR("Could not get target core id: %d\n", core); in am62l_pwr_domain_on() 38 proc_id = (uint8_t)(PLAT_PROC_START_ID + (uint32_t)core); in am62l_pwr_domain_on()
|
| /rk3399_ARM-atf/plat/qti/msm8916/ |
| H A D | msm8916_topology.c | 25 unsigned int core = MPIDR_AFFLVL0_VAL(mpidr); in plat_core_pos_by_mpidr() local 30 core >= PLATFORM_CPUS_PER_CLUSTER) { in plat_core_pos_by_mpidr() 33 return core | (cluster << PLATFORM_CPU_PER_CLUSTER_SHIFT); in plat_core_pos_by_mpidr()
|
| /rk3399_ARM-atf/plat/nvidia/tegra/soc/t186/drivers/mce/ |
| H A D | nvg.c | 204 int32_t nvg_online_core(uint32_t ari_base, uint32_t core) in nvg_online_core() argument 213 if ((core >= MCE_CORE_ID_MAX) || (cpu == core)) { in nvg_online_core() 214 ERROR("%s: unsupported core id (%d)\n", __func__, core); in nvg_online_core() 220 if ((impl == DENVER_IMPL) && ((core == 2U) || (core == 3U))) { in nvg_online_core() 221 ERROR("%s: unknown core id (%d)\n", __func__, core); in nvg_online_core() 226 ((uint64_t)core & MCE_CORE_ID_MASK)); in nvg_online_core()
|
| /rk3399_ARM-atf/docs/design/ |
| H A D | psci-pd-tree.rst | 36 #. The attributes of a core power domain differ from the attributes of power 37 domains at higher levels. For example, only a core power domain can be identified 39 performing a power management operation on the core power domain. 125 unique number (core index) between ``0`` and ``PLAT_CORE_COUNT - 1`` to each core 129 ``plat_core_pos_by_mpidr(mpidr)`` will return the core index for the core 131 which is not allocated or corresponds to an absent core. The semantics of this 135 Another mandatory API, ``plat_my_core_pos()`` has been added to return the core 136 index for the calling core. This API provides a more lightweight mechanism to get 137 the index since there is no need to validate the MPIDR of the calling core. 139 The platform should assign the core indices (as illustrated in the diagram above) [all …]
|
| /rk3399_ARM-atf/plat/nxp/s32/s32g274ardb2/ |
| H A D | plat_bl31_setup.c | 106 int core; in s32g2_mpidr_to_core_pos() local 108 core = plat_core_pos_by_mpidr(mpidr); in s32g2_mpidr_to_core_pos() 109 if (core < 0) { in s32g2_mpidr_to_core_pos() 113 return (unsigned int)core; in s32g2_mpidr_to_core_pos()
|
| /rk3399_ARM-atf/plat/hisilicon/hikey/ |
| H A D | hisi_pwrc.c | 25 void hisi_pwrc_set_core_bx_addr(unsigned int core, unsigned int cluster, in hisi_pwrc_set_core_bx_addr() argument 36 i = cluster * CLUSTER_CORE_COUNT + core; in hisi_pwrc_set_core_bx_addr() 55 void hisi_pwrc_enable_debug(unsigned int core, unsigned int cluster) in hisi_pwrc_enable_debug() argument 59 enable = 1U << (core + PDBGUP_CLUSTER1_SHIFT * cluster); in hisi_pwrc_enable_debug()
|
| /rk3399_ARM-atf/plat/hisilicon/hikey/include/ |
| H A D | hisi_pwrc.h | 13 void hisi_pwrc_set_core_bx_addr(unsigned int core, 16 void hisi_pwrc_enable_debug(unsigned int core,
|