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

	/* Set capabilities required for saving DDR context */
	for (i = 0U; i < ARRAY_SIZE(pmPosDdrReqs_g); i++) {
		PmRequirement* req;
		u32 caps = pmPosDdrReqs_g[i].caps;

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

done:
	return status;
}
/**
 * PmSystemPosPrepareDdrCaps() - Set slave capabilities required for DDR
 * 				 context saving
 *
 * @return	XST_SUCCESS if capabilities are set, failure code otherwise
 */
Set slave capabilities required for DDR
context saving

@return      XST_SUCCESS if capabilities are set, failure code otherwise
Set slave capabilities required for DDR context saving @return XST_SUCCESS if capabilities are set failure code otherwise
static s32 PmSystemPosPrepareDdrCaps(void)
{
	s32 status = XST_SUCCESS;
	u32 i;
	for (i = 0U; i < ARRAY_SIZE(pmPosDdrReqs_g); i++) {
		PmRequirement* req;
		u32 caps = pmPosDdrReqs_g[i].caps;
		req = PmRequirementGetNoMaster(pmPosDdrReqs_g[i].slave);
		if (NULL != req) {
			if (0U == (caps & req->currReq)) {
				status = PmRequirementUpdate(req,
						caps | req->currReq);
				if (XST_SUCCESS != status) {
					goto done;
				}
			}
		} else {
			status = XST_FAILURE;
			goto done;
		}
	}
done:
	return status;
}
static s32 PmSystemPosPrepareDdrCaps ( void ) { s32 status = XST_SUCCESS ; u32 i ; for ( i = 0U ; i < ARRAY_SIZE ( pmPosDdrReqs_g ) ; i ++ ) { PmRequirement * req ; u32 caps = pmPosDdrReqs_g [ i ] . caps ; req = PmRequirementGetNoMaster ( pmPosDdrReqs_g [ i ] . slave ) ; if ( NULL != req ) { if ( 0U == ( caps & req -> currReq ) ) { status = PmRequirementUpdate ( req , caps | req -> currReq ) ; if ( XST_SUCCESS != status ) { goto done ; } } } else { status = XST_FAILURE ; goto done ; } } done : return status ; }
PmSystemPosPrepareDdrCaps() - Set slave capabilities required for DDR
                               context saving
PmSystemPosPrepareDdrCaps () - Set slave capabilities required for DDR context saving
/* Set capabilities required for saving DDR context */