tpg: Modified interrupts.
Modified interrupts in source files. Signed-off-by: Durga challa <vnsldurg@xilinx.com>
This commit is contained in:
parent
cd9ae86a15
commit
843c13d40b
2 changed files with 10 additions and 14 deletions
|
@ -130,8 +130,6 @@ int XTpg_CfgInitialize(XTpg *InstancePtr, XTpg_Config *CfgPtr,
|
|||
/* Setup the instance. */
|
||||
(void)memset((void *)InstancePtr, 0, sizeof(XTpg));
|
||||
|
||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
|
||||
(void)memcpy((void *)&(InstancePtr->Config), (const void *)CfgPtr,
|
||||
sizeof(XTpg_Config));
|
||||
InstancePtr->Config.BaseAddress = EffectiveAddr;
|
||||
|
@ -1469,8 +1467,8 @@ u32 XTpg_GetPattern(XTpg *InstancePtr)
|
|||
******************************************************************************/
|
||||
static void StubCallBack(void *CallBackRef)
|
||||
{
|
||||
(void)CallBackRef;
|
||||
/* Verify arguments. */
|
||||
Xil_AssertVoid(CallBackRef != NULL);
|
||||
Xil_AssertVoidAlways();
|
||||
}
|
||||
|
||||
|
@ -1496,9 +1494,9 @@ static void StubCallBack(void *CallBackRef)
|
|||
******************************************************************************/
|
||||
static void StubErrCallBack(void *CallBackRef, u32 ErrorMask)
|
||||
{
|
||||
(void)CallBackRef;
|
||||
(void)ErrorMask;
|
||||
/* Verify arguments. */
|
||||
Xil_AssertVoid(CallBackRef != NULL);
|
||||
Xil_AssertVoid(ErrorMask != ((u32)0x0));
|
||||
Xil_AssertVoidAlways();
|
||||
}
|
||||
|
||||
|
|
|
@ -109,17 +109,11 @@ void XTpg_IntrHandler(void *InstancePtr)
|
|||
/* Get pending interrupts */
|
||||
PendingIntr = (u32)XTpg_IntrGetPending(XTpgPtr);
|
||||
|
||||
/* Error interrupt is occurring or spurious interrupt */
|
||||
if (((u32)0x0 == ((PendingIntr) & ((u32)(XTPG_IXR_ALLINTR_MASK)))) ||
|
||||
(((PendingIntr) & ((u32)(XTPG_IXR_SE_MASK))) ==
|
||||
(u32)(XTPG_IXR_SE_MASK))) {
|
||||
/* A Slave error interrupt has been happened */
|
||||
if (((PendingIntr) & (XTPG_IXR_SE_MASK)) ==
|
||||
(XTPG_IXR_SE_MASK)) {
|
||||
ErrorStatus = (PendingIntr) & ((u32)(XTPG_IXR_SE_MASK));
|
||||
XTpgPtr->ErrCallBack(XTpgPtr->ErrRef, ErrorStatus);
|
||||
|
||||
/*
|
||||
* The Error CallBack should reset the core and so
|
||||
* there is no need to handle other interrupts
|
||||
*/
|
||||
}
|
||||
|
||||
/* A Processing Start interrupt has occurred */
|
||||
|
@ -176,6 +170,10 @@ int XTpg_SetCallBack(XTpg *InstancePtr, u32 HandlerType,
|
|||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
Xil_AssertNonvoid(InstancePtr->IsReady ==
|
||||
(u32)(XIL_COMPONENT_IS_READY));
|
||||
Xil_AssertNonvoid(CallBackFunc != NULL);
|
||||
Xil_AssertNonvoid(CallBackRef != NULL);
|
||||
Xil_AssertNonvoid((HandlerType >= XTPG_HANDLER_PROCSTART) &&
|
||||
(HandlerType <= XTPG_HANDLER_ERROR));
|
||||
|
||||
/* Setting the handlerType */
|
||||
switch (HandlerType) {
|
||||
|
|
Loading…
Add table
Reference in a new issue