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

	for (i = 0U; i < ARRAY_SIZE(pmPosDdrReqs_g); i++) {
		PmRequirement* req;

		req = PmRequirementGetNoMaster(pmPosDdrReqs_g[i].slave);
		if (req == NULL) {
			req = PmRequirementAdd(NULL, pmPosDdrReqs_g[i].slave);
			if (NULL == req) {
				status = XST_FAILURE;
				goto done;
			}

			status = PmCheckCapabilities(req->slave,
						pmPosDdrReqs_g[i].caps);
			if (XST_SUCCESS != status) {
				status = XST_FAILURE;
				goto done;
			}
			req->info |= PM_SYSTEM_USING_SLAVE_MASK;
			req->preReq = 0U;
			req->currReq = 0U;
			req->nextReq = 0U;
			req->defaultReq = 0U;
			req->latencyReq = 0U;
		}
	}

done:
	return status;
}
/**
 * PmSystemPosDdrRequirementAdd() - Add DDR context saving requirements
 * @return	XST_SUCCESS if requirements are added, XST_FAILURE otherwise
 */
Add DDR context saving requirements
@return      XST_SUCCESS if requirements are added, XST_FAILURE otherwise
Add DDR context saving requirements @return XST_SUCCESS if requirements are added XST_FAILURE otherwise
static s32 PmSystemPosDdrRequirementAdd(void)
{
	s32 status = XST_SUCCESS;
	u32 i;
	for (i = 0U; i < ARRAY_SIZE(pmPosDdrReqs_g); i++) {
		PmRequirement* req;
		req = PmRequirementGetNoMaster(pmPosDdrReqs_g[i].slave);
		if (req == NULL) {
			req = PmRequirementAdd(NULL, pmPosDdrReqs_g[i].slave);
			if (NULL == req) {
				status = XST_FAILURE;
				goto done;
			}
			status = PmCheckCapabilities(req->slave,
						pmPosDdrReqs_g[i].caps);
			if (XST_SUCCESS != status) {
				status = XST_FAILURE;
				goto done;
			}
			req->info |= PM_SYSTEM_USING_SLAVE_MASK;
			req->preReq = 0U;
			req->currReq = 0U;
			req->nextReq = 0U;
			req->defaultReq = 0U;
			req->latencyReq = 0U;
		}
	}
done:
	return status;
}
static s32 PmSystemPosDdrRequirementAdd ( void ) { s32 status = XST_SUCCESS ; u32 i ; for ( i = 0U ; i < ARRAY_SIZE ( pmPosDdrReqs_g ) ; i ++ ) { PmRequirement * req ; req = PmRequirementGetNoMaster ( pmPosDdrReqs_g [ i ] . slave ) ; if ( req == NULL ) { req = PmRequirementAdd ( NULL , pmPosDdrReqs_g [ i ] . slave ) ; if ( NULL == req ) { status = XST_FAILURE ; goto done ; } status = PmCheckCapabilities ( req -> slave , pmPosDdrReqs_g [ i ] . caps ) ; if ( XST_SUCCESS != status ) { status = XST_FAILURE ; goto done ; } req -> info |= PM_SYSTEM_USING_SLAVE_MASK ; req -> preReq = 0U ; req -> currReq = 0U ; req -> nextReq = 0U ; req -> defaultReq = 0U ; req -> latencyReq = 0U ; } } done : return status ; }
PmSystemPosDdrRequirementAdd() - Add DDR context saving requirements
 @return      XST_SUCCESS if requirements are added, XST_FAILURE otherwise
PmSystemPosDdrRequirementAdd () - Add DDR context saving requirements @return XST_SUCCESS if requirements are added XST_FAILURE otherwise