lib/sw_apps/zynqmp_pmufw/src/pm_proc.c
static s32 PmProcTrSuspendToSleep(PmProc* const proc)
{
	s32 status;
	u32 worstCaseLatency = proc->pwrDnLatency + proc->pwrUpLatency;

	PmInfo("%s susp->sleep\r\n", proc->node.name);
	proc->node.latencyMarg = proc->latencyReq - worstCaseLatency;

	status = PmProcSleep(proc);
	if (XST_SUCCESS == status) {
		PmNodeUpdateCurrState(&proc->node, PM_PROC_STATE_SLEEP);

		/* Notify the master that the processor completed suspend */
		status = PmMasterFsm(proc->master, PM_MASTER_EVENT_SLEEP);

		/* If suspended, remember which processor to wake-up first */
		if (true == PmMasterIsSuspended(proc->master)) {
			proc->master->wakeProc = proc;
		}
	}
	DISABLE_WFI(proc->mask);
	ENABLE_WAKE(proc->mask);

	return status;
}
/**
 * PmProcTrSuspendToSleep() - FSM transition from suspend to sleep state
 * @proc    Pointer to processor whose FSM is changing state
 *
 * @return  Operation status
 *
 * @note    Processor had previously called self suspend and now PMU has
 *          received processor's wfi interrupt.
 */
FSM transition from suspend to sleep state
@proc    Pointer to processor whose FSM is changing state

@return  Operation status

@note    Processor had previously called self suspend and now PMU has
received processor's wfi interrupt.
FSM transition from suspend to sleep state @proc Pointer to processor whose FSM is changing state @return Operation status @note Processor had previously called self suspend and now PMU has received processor ' s wfi interrupt .
static s32 PmProcTrSuspendToSleep(PmProc* const proc)
{
	s32 status;
	u32 worstCaseLatency = proc->pwrDnLatency + proc->pwrUpLatency;
	PmInfo("%s susp->sleep\r\n", proc->node.name);
	proc->node.latencyMarg = proc->latencyReq - worstCaseLatency;
	status = PmProcSleep(proc);
	if (XST_SUCCESS == status) {
		PmNodeUpdateCurrState(&proc->node, PM_PROC_STATE_SLEEP);
		status = PmMasterFsm(proc->master, PM_MASTER_EVENT_SLEEP);
		if (true == PmMasterIsSuspended(proc->master)) {
			proc->master->wakeProc = proc;
		}
	}
	DISABLE_WFI(proc->mask);
	ENABLE_WAKE(proc->mask);
	return status;
}
static s32 PmProcTrSuspendToSleep ( PmProc * const proc ) { s32 status ; u32 worstCaseLatency = proc -> pwrDnLatency + proc -> pwrUpLatency ; PmInfo ( " \r \n " , proc -> node . name ) ; proc -> node . latencyMarg = proc -> latencyReq - worstCaseLatency ; status = PmProcSleep ( proc ) ; if ( XST_SUCCESS == status ) { PmNodeUpdateCurrState ( & proc -> node , PM_PROC_STATE_SLEEP ) ; status = PmMasterFsm ( proc -> master , PM_MASTER_EVENT_SLEEP ) ; if ( true == PmMasterIsSuspended ( proc -> master ) ) { proc -> master -> wakeProc = proc ; } } DISABLE_WFI ( proc -> mask ) ; ENABLE_WAKE ( proc -> mask ) ; return status ; }
PmProcTrSuspendToSleep() - FSM transition from suspend to sleep state
 @proc    Pointer to processor whose FSM is changing state
PmProcTrSuspendToSleep () - FSM transition from suspend to sleep state @proc Pointer to processor whose FSM is changing state
/* Notify the master that the processor completed suspend */ /* If suspended, remember which processor to wake-up first */