lib/sw_apps/zynqmp_pmufw/src/pm_power.c
static s32 PmPowerUp(PmPower* const power)
{
	s32 status = XST_SUCCESS;

	/* Enable SysOsc for normal operation if it is in sleep mode. */
	if ((Xil_In32(AMS_PSSYSMON_CONFIG_REG2) & 0xF0U) == 0x30U) {
		PmPowerUpSysOsc();
	}

#ifdef DEBUG_MODE
	PmRequirement* req;
#if (STDOUT_BASEADDRESS == XPMU_UART_0_BASEADDR)
	req = PmRequirementGetNoMaster(&pmSlaveUart0_g);
#elif (STDOUT_BASEADDRESS == XPMU_UART_1_BASEADDR)
	req = PmRequirementGetNoMaster(&pmSlaveUart1_g);
#endif
	status = PmRequirementUpdate(req, PM_CAP_ACCESS);
	if (XST_SUCCESS != status) {
		goto done;
	}
#endif

	PmInfo("%s 0->1\r\n", power->node.name);

	if (PM_PWR_STATE_ON == power->node.currState) {
		goto done;
	}

	if (NULL != power->powerUp) {
		status = power->powerUp();
	}

	if (XST_SUCCESS != status) {
		goto done;
	}

	if (NULL != power->node.clocks) {
		status = PmClockRequest(&power->node);
	}

	PmNodeUpdateCurrState(&power->node, PM_PWR_STATE_ON);

done:
	return status;
}
/**
 * PmPowerUp() - Power up island/domain
 * @power      Power node to be powered up
 *
 * @return  Operation status of power up procedure (node specific) or
 *          XST_SUCCESS
 */
Power up island/domain
@power      Power node to be powered up

@return  Operation status of power up procedure (node specific) or
XST_SUCCESS
Power up island / domain @power Power node to be powered up @return Operation status of power up procedure ( node specific ) or XST_SUCCESS
static s32 PmPowerUp(PmPower* const power)
{
	s32 status = XST_SUCCESS;
	if ((Xil_In32(AMS_PSSYSMON_CONFIG_REG2) & 0xF0U) == 0x30U) {
		PmPowerUpSysOsc();
	}
#ifdef DEBUG_MODE
	PmRequirement* req;
#if (STDOUT_BASEADDRESS == XPMU_UART_0_BASEADDR)
	req = PmRequirementGetNoMaster(&pmSlaveUart0_g);
#elif (STDOUT_BASEADDRESS == XPMU_UART_1_BASEADDR)
	req = PmRequirementGetNoMaster(&pmSlaveUart1_g);
#endif
	status = PmRequirementUpdate(req, PM_CAP_ACCESS);
	if (XST_SUCCESS != status) {
		goto done;
	}
#endif
	PmInfo("%s 0->1\r\n", power->node.name);
	if (PM_PWR_STATE_ON == power->node.currState) {
		goto done;
	}
	if (NULL != power->powerUp) {
		status = power->powerUp();
	}
	if (XST_SUCCESS != status) {
		goto done;
	}
	if (NULL != power->node.clocks) {
		status = PmClockRequest(&power->node);
	}
	PmNodeUpdateCurrState(&power->node, PM_PWR_STATE_ON);
done:
	return status;
}
static s32 PmPowerUp ( PmPower * const power ) { s32 status = XST_SUCCESS ; if ( ( Xil_In32 ( AMS_PSSYSMON_CONFIG_REG2 ) & 0xF0U ) == 0x30U ) { PmPowerUpSysOsc ( ) ; } #ifdef DEBUG_MODE PmRequirement * req ; #if ( STDOUT_BASEADDRESS == XPMU_UART_0_BASEADDR ) req = PmRequirementGetNoMaster ( & pmSlaveUart0_g ) ; #elif ( STDOUT_BASEADDRESS == XPMU_UART_1_BASEADDR ) req = PmRequirementGetNoMaster ( & pmSlaveUart1_g ) ; #endif status = PmRequirementUpdate ( req , PM_CAP_ACCESS ) ; if ( XST_SUCCESS != status ) { goto done ; } #endif PmInfo ( " \r \n " , power -> node . name ) ; if ( PM_PWR_STATE_ON == power -> node . currState ) { goto done ; } if ( NULL != power -> powerUp ) { status = power -> powerUp ( ) ; } if ( XST_SUCCESS != status ) { goto done ; } if ( NULL != power -> node . clocks ) { status = PmClockRequest ( & power -> node ) ; } PmNodeUpdateCurrState ( & power -> node , PM_PWR_STATE_ON ) ; done : return status ; }
PmPowerUp() - Power up island/domain
 @power      Power node to be powered up
PmPowerUp () - Power up island / domain @power Power node to be powered up
/* Enable SysOsc for normal operation if it is in sleep mode. */