XilinxProcessorIPLib/drivers/aienginev2/src/interrupt/xaie_interrupt.c
AieRC XAie_IntrCtrlL1IrqSet(XAie_DevInst *DevInst, XAie_LocType Loc,
		XAie_BroadcastSw Switch, u8 BroadcastId)
{
	u64 RegAddr;
	u32 RegOffset;
	u8 TileType;
	const XAie_L1IntrMod *L1IntrMod;

	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_MAX) {
		XAIE_ERROR("Invalid tile type\n");
		return XAIE_INVALID_TILE;
	}

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

	if(L1IntrMod == NULL || BroadcastId >= L1IntrMod->NumBroadcastIds) {
		XAIE_ERROR("Invalid module type or broadcast ID\n");
		return XAIE_INVALID_ARGS;
	}

	RegOffset = L1IntrMod->BaseIrqRegOff + Switch * L1IntrMod->SwOff;
	RegAddr = _XAie_GetTileAddr(DevInst, Loc.Row, Loc.Col) + RegOffset;

	return XAie_Write32(DevInst, RegAddr, BroadcastId);
}
/*****************************************************************************/
/**
*
* This API sets broadcast ID on which the interrupt from first level interrupt
* controller shall be driven to.
*
* @param	DevInst: Device Instance
* @param	Loc: Location of AIE Tile
* @param	Switch: Switch in the given module. For shim tile value could be
*			XAIE_EVENT_SWITCH_A or XAIE_EVENT_SWITCH_B.
* @param	BroadcastId: Broadcast index on which the interrupt shall be
*			     driven.
*
* @return	XAIE_OK on success, error code on failure.
*
* @note		None.
*
******************************************************************************/
This API sets broadcast ID on which the interrupt from first level interrupt
controller shall be driven to.
This API sets broadcast ID on which the interrupt from first level interrupt controller shall be driven to .
AieRC XAie_IntrCtrlL1IrqSet(XAie_DevInst *DevInst, XAie_LocType Loc,
		XAie_BroadcastSw Switch, u8 BroadcastId)
{
	u64 RegAddr;
	u32 RegOffset;
	u8 TileType;
	const XAie_L1IntrMod *L1IntrMod;
	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_MAX) {
		XAIE_ERROR("Invalid tile type\n");
		return XAIE_INVALID_TILE;
	}
	L1IntrMod = DevInst->DevProp.DevMod[TileType].L1IntrMod;
	if(L1IntrMod == NULL || BroadcastId >= L1IntrMod->NumBroadcastIds) {
		XAIE_ERROR("Invalid module type or broadcast ID\n");
		return XAIE_INVALID_ARGS;
	}
	RegOffset = L1IntrMod->BaseIrqRegOff + Switch * L1IntrMod->SwOff;
	RegAddr = _XAie_GetTileAddr(DevInst, Loc.Row, Loc.Col) + RegOffset;
	return XAie_Write32(DevInst, RegAddr, BroadcastId);
}
AieRC XAie_IntrCtrlL1IrqSet ( XAie_DevInst * DevInst , XAie_LocType Loc , XAie_BroadcastSw Switch , u8 BroadcastId ) { u64 RegAddr ; u32 RegOffset ; u8 TileType ; const XAie_L1IntrMod * L1IntrMod ; 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_MAX ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_TILE ; } L1IntrMod = DevInst -> DevProp . DevMod [ TileType ] . L1IntrMod ; if ( L1IntrMod == NULL || BroadcastId >= L1IntrMod -> NumBroadcastIds ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_ARGS ; } RegOffset = L1IntrMod -> BaseIrqRegOff + Switch * L1IntrMod -> SwOff ; RegAddr = _XAie_GetTileAddr ( DevInst , Loc . Row , Loc . Col ) + RegOffset ; return XAie_Write32 ( DevInst , RegAddr , BroadcastId ) ; }
This API sets broadcast ID on which the interrupt from first level interrupt
controller shall be driven to.
This API sets broadcast ID on which the interrupt from first level interrupt controller shall be driven to .