XilinxProcessorIPLib/drivers/aienginev2/src/interrupt/xaie_interrupt.c
static AieRC _XAie_IntrCtrlL2Config(XAie_DevInst *DevInst, XAie_LocType Loc,
		u32 ChannelBitMap, u8 Enable)
{
	u64 RegAddr;
	u32 RegOffset;
	u8 TileType;
	const XAie_L2IntrMod *L2IntrMod;

	if((DevInst == XAIE_NULL) ||
			(DevInst->IsReady != XAIE_COMPONENT_IS_READY)) {
		XAIE_ERROR("Invalid device instance\n");
		return XAIE_INVALID_ARGS;
	}

	TileType = DevInst->DevOps->GetTTypefromLoc(DevInst, Loc);
	if(TileType != XAIEGBL_TILE_TYPE_SHIMNOC) {
		XAIE_ERROR("Invalid tile type\n");
		return XAIE_INVALID_TILE;
	}

	L2IntrMod = DevInst->DevProp.DevMod[TileType].L2IntrMod;

	if(ChannelBitMap >= (XAIE_ENABLE << L2IntrMod->NumBroadcastIds)) {
		XAIE_ERROR("Invalid interrupt bitmap\n");
		return XAIE_INVALID_ARGS;
	}

	if(Enable == XAIE_ENABLE)
		RegOffset = L2IntrMod->EnableRegOff;
	else
		RegOffset = L2IntrMod->DisableRegOff;

	RegAddr = _XAie_GetTileAddr(DevInst, Loc.Row, Loc.Col) + RegOffset;

	return XAie_Write32(DevInst, RegAddr, ChannelBitMap);
}
/*****************************************************************************/
/**
*
* This API enables/disables interrupts to second level interrupt controller.
*
* @param	DevInst: Device Instance
* @param	Loc: Location of AIE Tile
* @param	ChannelBitMap: Interrupt Bitmap.
* @param	Enable: XAIE_ENABLE or XAIE_DISABLE to enable or disable.
*
* @return	XAIE_OK on success, error code on failure.
*
* @note		Internal Only.
*
******************************************************************************/
This API enables/disables interrupts to second level interrupt controller.
This API enables / disables interrupts to second level interrupt controller .
static AieRC _XAie_IntrCtrlL2Config(XAie_DevInst *DevInst, XAie_LocType Loc,
		u32 ChannelBitMap, u8 Enable)
{
	u64 RegAddr;
	u32 RegOffset;
	u8 TileType;
	const XAie_L2IntrMod *L2IntrMod;
	if((DevInst == XAIE_NULL) ||
			(DevInst->IsReady != XAIE_COMPONENT_IS_READY)) {
		XAIE_ERROR("Invalid device instance\n");
		return XAIE_INVALID_ARGS;
	}
	TileType = DevInst->DevOps->GetTTypefromLoc(DevInst, Loc);
	if(TileType != XAIEGBL_TILE_TYPE_SHIMNOC) {
		XAIE_ERROR("Invalid tile type\n");
		return XAIE_INVALID_TILE;
	}
	L2IntrMod = DevInst->DevProp.DevMod[TileType].L2IntrMod;
	if(ChannelBitMap >= (XAIE_ENABLE << L2IntrMod->NumBroadcastIds)) {
		XAIE_ERROR("Invalid interrupt bitmap\n");
		return XAIE_INVALID_ARGS;
	}
	if(Enable == XAIE_ENABLE)
		RegOffset = L2IntrMod->EnableRegOff;
	else
		RegOffset = L2IntrMod->DisableRegOff;
	RegAddr = _XAie_GetTileAddr(DevInst, Loc.Row, Loc.Col) + RegOffset;
	return XAie_Write32(DevInst, RegAddr, ChannelBitMap);
}
static AieRC _XAie_IntrCtrlL2Config ( XAie_DevInst * DevInst , XAie_LocType Loc , u32 ChannelBitMap , u8 Enable ) { u64 RegAddr ; u32 RegOffset ; u8 TileType ; const XAie_L2IntrMod * L2IntrMod ; if ( ( DevInst == XAIE_NULL ) || ( DevInst -> IsReady != XAIE_COMPONENT_IS_READY ) ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_ARGS ; } TileType = DevInst -> DevOps -> GetTTypefromLoc ( DevInst , Loc ) ; if ( TileType != XAIEGBL_TILE_TYPE_SHIMNOC ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_TILE ; } L2IntrMod = DevInst -> DevProp . DevMod [ TileType ] . L2IntrMod ; if ( ChannelBitMap >= ( XAIE_ENABLE << L2IntrMod -> NumBroadcastIds ) ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_ARGS ; } if ( Enable == XAIE_ENABLE ) RegOffset = L2IntrMod -> EnableRegOff ; else RegOffset = L2IntrMod -> DisableRegOff ; RegAddr = _XAie_GetTileAddr ( DevInst , Loc . Row , Loc . Col ) + RegOffset ; return XAie_Write32 ( DevInst , RegAddr , ChannelBitMap ) ; }
This API enables/disables interrupts to second level interrupt controller.
This API enables / disables interrupts to second level interrupt controller .