lib/sw_apps/zynqmp_pmufw/src/pm_power.c
static s32 PmPowerForceDown(PmNode* const powerNode)
{
	PmNode* node;
	PmPower* const power = (PmPower*)powerNode->derived;
	s32 status = XST_FAILURE;

	PmPowerDfsBegin(power);
	node = PmPowerDfsGetNext();
	while (NULL != node) {
		if (NODE_IS_POWER(node)) {
			status = PmPowerDown((PmPower*)node->derived);
		} else {
			status = PmNodeForceDown(node);
		}
		if (XST_SUCCESS != status) {
			goto done;
		}
		node = PmPowerDfsGetNext();
	}
	if ((NULL != power->class) && (NULL != power->class->forceDown)) {
		power->class->forceDown(power);
	}

done:
	return status;
}
/**
 * PmPowerForceDown() - Force down the power node and all of its children
 * @powerNode	Power node to force down
 *
 * @return	Status of performing force power down
 */
Force down the power node and all of its children
@powerNode   Power node to force down

@return      Status of performing force power down
Force down the power node and all of its children @powerNode Power node to force down @return Status of performing force power down
static s32 PmPowerForceDown(PmNode* const powerNode)
{
	PmNode* node;
	PmPower* const power = (PmPower*)powerNode->derived;
	s32 status = XST_FAILURE;
	PmPowerDfsBegin(power);
	node = PmPowerDfsGetNext();
	while (NULL != node) {
		if (NODE_IS_POWER(node)) {
			status = PmPowerDown((PmPower*)node->derived);
		} else {
			status = PmNodeForceDown(node);
		}
		if (XST_SUCCESS != status) {
			goto done;
		}
		node = PmPowerDfsGetNext();
	}
	if ((NULL != power->class) && (NULL != power->class->forceDown)) {
		power->class->forceDown(power);
	}
done:
	return status;
}
static s32 PmPowerForceDown ( PmNode * const powerNode ) { PmNode * node ; PmPower * const power = ( PmPower * ) powerNode -> derived ; s32 status = XST_FAILURE ; PmPowerDfsBegin ( power ) ; node = PmPowerDfsGetNext ( ) ; while ( NULL != node ) { if ( NODE_IS_POWER ( node ) ) { status = PmPowerDown ( ( PmPower * ) node -> derived ) ; } else { status = PmNodeForceDown ( node ) ; } if ( XST_SUCCESS != status ) { goto done ; } node = PmPowerDfsGetNext ( ) ; } if ( ( NULL != power -> class ) && ( NULL != power -> class -> forceDown ) ) { power -> class -> forceDown ( power ) ; } done : return status ; }
PmPowerForceDown() - Force down the power node and all of its children
 @powerNode   Power node to force down
PmPowerForceDown () - Force down the power node and all of its children @powerNode Power node to force down