lib/sw_apps/zynqmp_pmufw/src/pm_system.c
s32 PmSystemPreparePowerOffSuspend(void)
{
	s32 status = XST_SUCCESS;
	u32 i;

	pmSystem.suspendType = PM_SUSPEND_TYPE_POWER_OFF;

	/* Mark used TCM memory regions */
	PmSystemCheckTcm();

	/* Set Power Off Suspend capability for every system slave */
	for (i = 0U; i < ARRAY_SIZE(pmSystemReqs); i++) {
		PmRequirement* req;
		u32 caps = pmSystemReqs[i].posCaps;

		req = PmRequirementGetNoMaster(pmSystemReqs[i].slave);
		if (NULL != req) {
			if (caps != req->currReq) {
				status = PmRequirementUpdate(req, caps);
				if (XST_SUCCESS != status) {
					goto done;
				}
			}
		} else {
			status = XST_FAILURE;
			goto done;
		}
	}

	/* Set DDR context saving slave capabilities */
	status = PmSystemPosPrepareDdrCaps();

done:
	return status;
}
/**
 * PmSystemPreparePowerOffSuspend() - Prepare system for entering Power Off
 * 				      Suspend state
 *
 * @return	XST_SUCCESS if all Power Off Suspend system slave capabilities
 * 		are set, failure code otherwise
 */
Prepare system for entering Power Off
Suspend state

@return      XST_SUCCESS if all Power Off Suspend system slave capabilities
are set, failure code otherwise
Prepare system for entering Power Off Suspend state @return XST_SUCCESS if all Power Off Suspend system slave capabilities are set failure code otherwise
s32 PmSystemPreparePowerOffSuspend(void)
{
	s32 status = XST_SUCCESS;
	u32 i;
	pmSystem.suspendType = PM_SUSPEND_TYPE_POWER_OFF;
	PmSystemCheckTcm();
	for (i = 0U; i < ARRAY_SIZE(pmSystemReqs); i++) {
		PmRequirement* req;
		u32 caps = pmSystemReqs[i].posCaps;
		req = PmRequirementGetNoMaster(pmSystemReqs[i].slave);
		if (NULL != req) {
			if (caps != req->currReq) {
				status = PmRequirementUpdate(req, caps);
				if (XST_SUCCESS != status) {
					goto done;
				}
			}
		} else {
			status = XST_FAILURE;
			goto done;
		}
	}
	status = PmSystemPosPrepareDdrCaps();
done:
	return status;
}
s32 PmSystemPreparePowerOffSuspend ( void ) { s32 status = XST_SUCCESS ; u32 i ; pmSystem . suspendType = PM_SUSPEND_TYPE_POWER_OFF ; PmSystemCheckTcm ( ) ; for ( i = 0U ; i < ARRAY_SIZE ( pmSystemReqs ) ; i ++ ) { PmRequirement * req ; u32 caps = pmSystemReqs [ i ] . posCaps ; req = PmRequirementGetNoMaster ( pmSystemReqs [ i ] . slave ) ; if ( NULL != req ) { if ( caps != req -> currReq ) { status = PmRequirementUpdate ( req , caps ) ; if ( XST_SUCCESS != status ) { goto done ; } } } else { status = XST_FAILURE ; goto done ; } } status = PmSystemPosPrepareDdrCaps ( ) ; done : return status ; }
PmSystemPreparePowerOffSuspend() - Prepare system for entering Power Off
                                    Suspend state
PmSystemPreparePowerOffSuspend () - Prepare system for entering Power Off Suspend state
/* Mark used TCM memory regions */ /* Set Power Off Suspend capability for every system slave */ /* Set DDR context saving slave capabilities */