Browse Source

imx: imx8qx: add domain off support

Add domain off support for Linux kernel's cpu
hot-plug feature, when there are cpu off request
from Linux kernel, TF-A will send command to
system controller to do CPU power gate accordingly.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
pull/1471/head
Anson Huang 6 years ago
parent
commit
3260f5c7c8
  1. 12
      plat/imx/imx8qx/imx8qx_psci.c

12
plat/imx/imx8qx/imx8qx_psci.c

@ -60,12 +60,24 @@ int imx_validate_ns_entrypoint(uintptr_t ns_entrypoint)
return PSCI_E_SUCCESS;
}
void imx_pwr_domain_off(const psci_power_state_t *target_state)
{
u_register_t mpidr = read_mpidr_el1();
unsigned int cpu_id = MPIDR_AFFLVL0_VAL(mpidr);
plat_gic_cpuif_disable();
sc_pm_req_cpu_low_power_mode(ipc_handle, ap_core_index[cpu_id],
SC_PM_PW_MODE_OFF, SC_PM_WAKE_SRC_NONE);
tf_printf("turn off core:%d\n", cpu_id);
}
static const plat_psci_ops_t imx_plat_psci_ops = {
.pwr_domain_on = imx_pwr_domain_on,
.pwr_domain_on_finish = imx_pwr_domain_on_finish,
.validate_ns_entrypoint = imx_validate_ns_entrypoint,
.system_off = imx_system_off,
.system_reset = imx_system_reset,
.pwr_domain_off = imx_pwr_domain_off,
};
int plat_setup_psci_ops(uintptr_t sec_entrypoint,

Loading…
Cancel
Save