lib/sw_apps/zynqmp_pmufw/src/xpfw_aib.c
void XPfw_AibEnable(enum XPfwAib AibId)
{
	u32 Status;
	u32 TimeOutCount = AIB_ACK_TIMEOUT;
	u32 AibReqRegAddr;

	if (AibId >= XPFW_AIB_ID_MAX) {
		XPfw_Printf(DEBUG_DETAILED, "Err: invalid AIB#%d\r\n", AibId);
		goto Done;
	}

	if (AibId == XPFW_AIB_FPD_TO_GPU) {
		AibReqRegAddr = LPD_SLCR_ISO_AIBAPB_REQ;
	} else {
		AibReqRegAddr = LPD_SLCR_ISO_AIBAXI_REQ;
	}
	XPfw_RMW32(AibReqRegAddr, AibMask[AibId], AibMask[AibId]);

	/* Loop until the AIB isolation ack is not received or we timeout */
	do {
		Status = XPfw_Read32(LPD_SLCR_ISO_AIBAXI_ACK) & AibMask[AibId];
		if (Status != 0U) {
			break;
		}
		--TimeOutCount;
		usleep(10U);
	} while (TimeOutCount > 0U);

	if (Status == 0U) {
		XPfw_Printf(DEBUG_DETAILED, "No AIB#%d ack\r\n", AibId);
	}

Done:
	return;
}
/**
 * Enable AIB isolation
 * @param AibId is ID of the AIB instance that needs to be enabled
 */
Enable AIB isolation
@param AibId is ID of the AIB instance that needs to be enabled
Enable AIB isolation @param AibId is ID of the AIB instance that needs to be enabled
void XPfw_AibEnable(enum XPfwAib AibId)
{
	u32 Status;
	u32 TimeOutCount = AIB_ACK_TIMEOUT;
	u32 AibReqRegAddr;
	if (AibId >= XPFW_AIB_ID_MAX) {
		XPfw_Printf(DEBUG_DETAILED, "Err: invalid AIB#%d\r\n", AibId);
		goto Done;
	}
	if (AibId == XPFW_AIB_FPD_TO_GPU) {
		AibReqRegAddr = LPD_SLCR_ISO_AIBAPB_REQ;
	} else {
		AibReqRegAddr = LPD_SLCR_ISO_AIBAXI_REQ;
	}
	XPfw_RMW32(AibReqRegAddr, AibMask[AibId], AibMask[AibId]);
	do {
		Status = XPfw_Read32(LPD_SLCR_ISO_AIBAXI_ACK) & AibMask[AibId];
		if (Status != 0U) {
			break;
		}
		--TimeOutCount;
		usleep(10U);
	} while (TimeOutCount > 0U);
	if (Status == 0U) {
		XPfw_Printf(DEBUG_DETAILED, "No AIB#%d ack\r\n", AibId);
	}
Done:
	return;
}
void XPfw_AibEnable ( enum XPfwAib AibId ) { u32 Status ; u32 TimeOutCount = AIB_ACK_TIMEOUT ; u32 AibReqRegAddr ; if ( AibId >= XPFW_AIB_ID_MAX ) { XPfw_Printf ( DEBUG_DETAILED , " \r \n " , AibId ) ; goto Done ; } if ( AibId == XPFW_AIB_FPD_TO_GPU ) { AibReqRegAddr = LPD_SLCR_ISO_AIBAPB_REQ ; } else { AibReqRegAddr = LPD_SLCR_ISO_AIBAXI_REQ ; } XPfw_RMW32 ( AibReqRegAddr , AibMask [ AibId ] , AibMask [ AibId ] ) ; do { Status = XPfw_Read32 ( LPD_SLCR_ISO_AIBAXI_ACK ) & AibMask [ AibId ] ; if ( Status != 0U ) { break ; } -- TimeOutCount ; usleep ( 10U ) ; } while ( TimeOutCount > 0U ) ; if ( Status == 0U ) { XPfw_Printf ( DEBUG_DETAILED , " \r \n " , AibId ) ; } Done : return ; }
Enable AIB isolation
 @param AibId is ID of the AIB instance that needs to be enabled
Enable AIB isolation @param AibId is ID of the AIB instance that needs to be enabled
/* Loop until the AIB isolation ack is not received or we timeout */