lib/sw_apps/zynqmp_pmufw/src/pm_power.c
static s32 PmPowerGetWakeUpLatency(const PmNode* const node, u32* const lat)
{
	PmPower* const power = (PmPower*)node->derived;
	PmPower* parent = power->node.parent;

	*lat = 0U;
	if (PM_PWR_STATE_ON == node->currState) {
		goto done;
	}

	*lat = power->pwrUpLatency;

	/* Account latencies of powered down parents (if a parent is down) */
	while (NULL != parent) {
		if (PM_PWR_STATE_ON == parent->node.currState) {
			break;
		}
		*lat += parent->pwrUpLatency;
		parent = parent->node.parent;
	}

done:
	return XST_SUCCESS;
}
/**
 * PmPowerGetWakeUpLatency() - Get wake-up latency of the power node
 * @node	Power node whose wake-up latency should be get
 * @lat		Pointer to the location where the latency value should be stored
 *
 * @return	XST_SUCCESS always
 */
Get wake-up latency of the power node
@node        Power node whose wake-up latency should be get
@lat         Pointer to the location where the latency value should be stored


Get wake - up latency of the power node @node Power node whose wake - up latency should be get @lat Pointer to the location where the latency value should be stored
static s32 PmPowerGetWakeUpLatency(const PmNode* const node, u32* const lat)
{
	PmPower* const power = (PmPower*)node->derived;
	PmPower* parent = power->node.parent;
	*lat = 0U;
	if (PM_PWR_STATE_ON == node->currState) {
		goto done;
	}
	*lat = power->pwrUpLatency;
	while (NULL != parent) {
		if (PM_PWR_STATE_ON == parent->node.currState) {
			break;
		}
		*lat += parent->pwrUpLatency;
		parent = parent->node.parent;
	}
done:
	return XST_SUCCESS;
}
static s32 PmPowerGetWakeUpLatency ( const PmNode * const node , u32 * const lat ) { PmPower * const power = ( PmPower * ) node -> derived ; PmPower * parent = power -> node . parent ; * lat = 0U ; if ( PM_PWR_STATE_ON == node -> currState ) { goto done ; } * lat = power -> pwrUpLatency ; while ( NULL != parent ) { if ( PM_PWR_STATE_ON == parent -> node . currState ) { break ; } * lat += parent -> pwrUpLatency ; parent = parent -> node . parent ; } done : return XST_SUCCESS ; }
PmPowerGetWakeUpLatency() - Get wake-up latency of the power node
 @node        Power node whose wake-up latency should be get
 @lat         Pointer to the location where the latency value should be stored
PmPowerGetWakeUpLatency () - Get wake - up latency of the power node @node Power node whose wake - up latency should be get @lat Pointer to the location where the latency value should be stored
/* Account latencies of powered down parents (if a parent is down) */