lib/sw_apps/zynqmp_pmufw/src/pm_power.c
static void PmPowerUpdateLatencyMargin(PmPower* const power)
{
	u32 i;

	/* Find minimum latency margin of all children */
	power->node.latencyMarg = MAX_LATENCY;
	for (i = 0U; i < power->childCnt; i++) {
		if (power->children[i]->latencyMarg < power->node.latencyMarg) {
			power->node.latencyMarg = power->children[i]->latencyMarg;
		}
	}
	if ((power->pwrDnLatency + power->pwrUpLatency) < power->node.latencyMarg) {
		power->node.latencyMarg -= power->pwrDnLatency + power->pwrUpLatency;
	} else {
		power->node.latencyMarg = 0U;
	}
}
/**
 * PmPowerUpdateLatencyMargin() - Update latency margin for the power node
 * @power	Power node to update
 */
Update latency margin for the power node
@power       Power node to update
Update latency margin for the power node @power Power node to update
static void PmPowerUpdateLatencyMargin(PmPower* const power)
{
	u32 i;
	power->node.latencyMarg = MAX_LATENCY;
	for (i = 0U; i < power->childCnt; i++) {
		if (power->children[i]->latencyMarg < power->node.latencyMarg) {
			power->node.latencyMarg = power->children[i]->latencyMarg;
		}
	}
	if ((power->pwrDnLatency + power->pwrUpLatency) < power->node.latencyMarg) {
		power->node.latencyMarg -= power->pwrDnLatency + power->pwrUpLatency;
	} else {
		power->node.latencyMarg = 0U;
	}
}
static void PmPowerUpdateLatencyMargin ( PmPower * const power ) { u32 i ; power -> node . latencyMarg = MAX_LATENCY ; for ( i = 0U ; i < power -> childCnt ; i ++ ) { if ( power -> children [ i ] -> latencyMarg < power -> node . latencyMarg ) { power -> node . latencyMarg = power -> children [ i ] -> latencyMarg ; } } if ( ( power -> pwrDnLatency + power -> pwrUpLatency ) < power -> node . latencyMarg ) { power -> node . latencyMarg -= power -> pwrDnLatency + power -> pwrUpLatency ; } else { power -> node . latencyMarg = 0U ; } }
PmPowerUpdateLatencyMargin() - Update latency margin for the power node
 @power       Power node to update
PmPowerUpdateLatencyMargin () - Update latency margin for the power node @power Power node to update
/* Find minimum latency margin of all children */