plat/nvidia/tegra/soc/t210/plat_psci_handlers.c
/*******************************************************************************
 * Platform handler to calculate the proper target power level at the
 * specified affinity level
 ******************************************************************************/
Platform handler to calculate the proper target power level at the
specified affinity level
Platform handler to calculate the proper target power level at the specified affinity level
plat_local_state_t tegra_soc_get_target_pwr_state(unsigned int lvl,
					     const plat_local_state_t *states,
					     unsigned int ncpu)
{
	plat_local_state_t target = *states;
	int cpu = plat_my_core_pos();
	int core_pos = read_mpidr() & MPIDR_CPU_MASK;
	if (lvl == MPIDR_AFFLVL1)
		target = *(states + core_pos);
	if (lvl == MPIDR_AFFLVL2)
		target = *(states + cpu);
	if ((lvl == MPIDR_AFFLVL1) && ((target == PSTATE_ID_CLUSTER_IDLE) ||
	    (target == PSTATE_ID_CLUSTER_POWERDN))) {
		return target;
	}
	if (((lvl == MPIDR_AFFLVL2) || (lvl == MPIDR_AFFLVL1)) &&
	    (target == PSTATE_ID_SOC_POWERDN))
		return PSTATE_ID_SOC_POWERDN;
	return PSCI_LOCAL_STATE_RUN;
}
plat_local_state_t tegra_soc_get_target_pwr_state ( unsigned int lvl , const plat_local_state_t * states , unsigned int ncpu ) { plat_local_state_t target = * states ; int cpu = plat_my_core_pos ( ) ; int core_pos = read_mpidr ( ) & MPIDR_CPU_MASK ; if ( lvl == MPIDR_AFFLVL1 ) target = * ( states + core_pos ) ; if ( lvl == MPIDR_AFFLVL2 ) target = * ( states + cpu ) ; if ( ( lvl == MPIDR_AFFLVL1 ) && ( ( target == PSTATE_ID_CLUSTER_IDLE ) || ( target == PSTATE_ID_CLUSTER_POWERDN ) ) ) { return target ; } if ( ( ( lvl == MPIDR_AFFLVL2 ) || ( lvl == MPIDR_AFFLVL1 ) ) && ( target == PSTATE_ID_SOC_POWERDN ) ) return PSTATE_ID_SOC_POWERDN ; return PSCI_LOCAL_STATE_RUN ; }
Platform handler to calculate the proper target power level at the
 specified affinity level
Platform handler to calculate the proper target power level at the specified affinity level
/* get the power state at this level */ /* Cluster idle/power-down */ /* System Suspend */ /* default state */