/*! * ======== InterruptDsp_intUnregister ======== */ Void InterruptDsp_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; Int index; InterruptDsp_FxnTable *table; if (remoteProcId == InterruptDsp_hostProcId) { index = 0; } else if (remoteProcId == InterruptDsp_core0ProcId) { index = 1; } else { /* DSP cannot talk to CORE1 */ Assert_isTrue(FALSE, ti_sdo_ipc_Ipc_A_internal); } /* Disable the mailbox interrupt source */ InterruptDsp_intDisable(remoteProcId, intInfo); InterruptDsp_module->numPlugged--; if (InterruptDsp_module->numPlugged == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); } table = &(InterruptDsp_module->fxnTable[index]); table->func = NULL; table->arg = NULL; }
/* * ======== Timer_Instance_finalize ======== */ Void Timer_Instance_finalize(Timer_Object *obj, Int status) { UInt key; /* fall through in switch below is intentional */ switch (status) { /* Timer_delete() */ case TIMER_DELETED: /* setPeriodMicroSecs failed */ case BAD_PERIOD: initDevice(obj); if (obj->hwi) { Hwi_delete(&obj->hwi); } /* Hwi create failed */ case NO_HWI_OBJ: /* timer not available */ case NO_TIMER_AVAIL: /* invalid timer id */ case BAD_TIMER_ID: default: break; } key = Hwi_disable(); Timer_module->availMask |= 1; Timer_module->handle = NULL; Hwi_restore(key); }
/* * ======== Timer_Instance_finalize ======== */ Void Timer_Instance_finalize(Timer_Object *obj, Int status) { UInt key; /* fall through in switch below is intentional */ switch (status) { /* Timer_delete() */ case 0: /* Hwi create failed */ case 4: /* device config (setPeriodMicroSecs) failed */ case 3: Timer_initDevice(obj, NULL); if (obj->hwi) { Hwi_delete(&obj->hwi); } break; /* timer not available */ case 2: /* invalid timer id */ case 1: default: break; } key = Hwi_disable(); Timer_module->availMask |= (0x1 << obj->id); Timer_module->handles[obj->id] = NULL; Hwi_restore(key); }
/*! * ======== InterruptBenelli_intUnregister ======== */ Void InterruptBenelli_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { UInt mbxIdx; Int index; InterruptBenelli_FxnTable *table; Hwi_Handle hwiHandle; mbxIdx = MBX_BASEADDR_IDX(MBX_TABLE_IDX(remoteProcId, MultiProc_self())); index = PROCID(remoteProcId); /* Disable the mailbox interrupt source */ InterruptBenelli_intDisable(remoteProcId, intInfo); /* Disable the interrupt itself */ InterruptBenelli_module->numPlugged[mbxIdx]--; if (InterruptBenelli_module->numPlugged[mbxIdx] == 0) { hwiHandle = Hwi_getHandle(intInfo->localIntId); Hwi_delete(&hwiHandle); } /* Clear the FxnTable entry for the remote processor */ table = &(InterruptBenelli_module->fxnTable[index]); table->func = NULL; table->arg = 0; }
/*! * ======== InterruptDsp_intUnregister ======== */ Void InterruptDsp_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; Int index; InterruptDsp_FxnTable *table; if (remoteProcId == InterruptDsp_hostProcId) { index = 0; } else if (remoteProcId == InterruptDsp_videoProcId) { index = 1; } else if (remoteProcId == InterruptDsp_vpssProcId) { index = 2; } else { Assert_isTrue(FALSE, ti_sdo_ipc_Ipc_A_internal); return; /* keep Coverity happy */ } /* Disable the mailbox interrupt source */ InterruptDsp_intDisable(remoteProcId, intInfo); InterruptDsp_module->numPlugged--; if (InterruptDsp_module->numPlugged == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); } table = &(InterruptDsp_module->fxnTable[index]); table->func = NULL; table->arg = NULL; }
/*! * ======== InterruptDsp_intUnregister ======== */ Void InterruptDsp_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; Int index; UInt eventId; InterruptDsp_FxnTable *table; Assert_isTrue(((remoteProcId < MultiProc_getNumProcsInCluster()) && (remoteProcId == MultiProc_self())), ti_sdo_ipc_Ipc_A_internal); index = PROCID(remoteProcId); /* Disable the mailbox interrupt source */ InterruptDsp_intDisable(remoteProcId, intInfo); /* Make sure the interrupt only gets plugged once */ eventId = InterruptDsp_dspInterruptTable[index]; InterruptDsp_module->numPlugged--; EventCombiner_disableEvent(eventId); if (InterruptDsp_module->numPlugged == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); } table = &(InterruptDsp_module->fxnTable[index]); table->func = NULL; table->arg = NULL; }
/*! * ======== InterruptArp32_intUnregister ======== */ Void InterruptArp32_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { UInt16 index; UInt mbxIdx; Hwi_Handle hwiHandle; InterruptArp32_FxnTable *table; index = PROCID(remoteProcId); if ((remoteProcId == DSP0_ID) || (remoteProcId == BENELLI_CORE0_ID)) { mbxIdx = 0; } else if ((remoteProcId == DSP1_ID) || (remoteProcId == BENELLI_CORE1_ID)) { mbxIdx = 1; } else if (remoteProcId < InterruptArp32_NUM_EVES) { mbxIdx = 2; } /* Disable the mailbox interrupt source */ InterruptArp32_intDisable(remoteProcId, intInfo); InterruptArp32_module->numPlugged[mbxIdx]--; if (InterruptArp32_module->numPlugged[mbxIdx] == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(InterruptArp32_eveInterruptTable[index]); Hwi_delete(&hwiHandle); } /* Clear the FxnTable entry for the remote processor */ table = &(InterruptArp32_module->fxnTable[index]); table->func = NULL; table->arg = 0; }
/* * ======== InterruptHost_intUnregister ======== */ Void InterruptHost_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; Int index; InterruptHost_FxnTable *table; if (remoteProcId == InterruptHost_dspProcId) { index = 0; } else if (remoteProcId == InterruptHost_videoProcId) { index = 1; } else if (remoteProcId == InterruptHost_vpssProcId) { index = 2; } else if (remoteProcId == InterruptHost_eveProcId) { index = 3; } else { Assert_isTrue(FALSE, ti_sdo_ipc_Ipc_A_internal); return; /* should never get here, but keep Coverity happy */ } /* Disable the mailbox interrupt source */ InterruptHost_intDisable(remoteProcId, intInfo); if (remoteProcId == InterruptHost_eveProcId) { /* Delete the Hwi for eve internal mailbox */ hwiHandle = Hwi_getHandle(EVE_MAILBOX_HOSTINT); Hwi_delete(&hwiHandle); } else { /* decrement numPlugged */ InterruptHost_module->numPlugged--; if (InterruptHost_module->numPlugged == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(MAILBOX_HOSTINT); Hwi_delete(&hwiHandle); } } table = &(InterruptHost_module->fxnTable[index]); table->func = NULL; table->arg = NULL; }
/*! * ======== InterruptArm_intUnregister ======== * Register ISR for remote processor interrupt */ Void InterruptArm_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; /* Delete the Hwi and disable the corresponding interrupt */ hwiHandle = Hwi_getHandle(intInfo->localIntId); Hwi_delete(&hwiHandle); }
/*! * ======== InterruptDsp_intUnregister ======== * Register ISR for remote processor interrupt */ Void InterruptDsp_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; /* Delete the Hwi (and disable the corresponding interrupt) */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); }
/*! * ======== InterruptHost_intUnregister ======== */ Void InterruptHost_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; /* Delete the Hwi (and disable the corresponding interrupt) */ hwiHandle = Hwi_getHandle(HOSTINT); Hwi_delete(&hwiHandle); }
/*! * ======== InterruptDucati_intUnregister ======== */ Void InterruptDucati_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Int index; InterruptDucati_FxnTable *table; Hwi_Handle hwiHandle; if (remoteProcId == InterruptDucati_dspProcId) { index = 0; } else if (remoteProcId == InterruptDucati_hostProcId) { index = 1; } else { /* Going to the other M3 */ index = 2; } /* Disable the mailbox interrupt source */ InterruptDucati_intDisable(remoteProcId, intInfo); /* Disable the interrupt itself */ if (remoteProcId == InterruptDucati_videoProcId || remoteProcId == InterruptDucati_vpssProcId) { hwiHandle = Hwi_getHandle(M3INT); Hwi_delete(&hwiHandle); } else { InterruptDucati_module->numPlugged--; if (InterruptDucati_module->numPlugged == 0) { hwiHandle = Hwi_getHandle(intInfo->localIntId); Hwi_delete(&hwiHandle); } } /* Clear the FxnTable entry for the remote processor */ table = &(InterruptDucati_module->fxnTable[index]); table->func = NULL; table->arg = 0; }
/*! * ======== InterruptArp32_intUnregister ======== */ Void InterruptArp32_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; InterruptArp32_FxnTable *table; /* Disable the mailbox interrupt source */ InterruptArp32_intDisable(remoteProcId, intInfo); InterruptArp32_module->numPlugged--; if (InterruptArp32_module->numPlugged == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); } /* Clear the FxnTable entry for the remote processor */ table = &(InterruptArp32_module->fxnTable); table->func = NULL; table->arg = 0; }
Void Interrupt_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; Interrupt_FxnTable *table; UInt pos; Assert_isTrue(intInfo != NULL, NULL); Interrupt_module->numPlugged--; if (Interrupt_module->numPlugged == 0) { /* No need to disable interrupt: Hwi_delete takes care of this */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); } /* Unset the function table */ pos = MAP_RPROCID_TO_SRCC(remoteProcId, intInfo->localIntId); table = &(Interrupt_module->fxnTable[pos]); table->func = NULL; table->arg = 0; }
/* * ======== InterruptEve_intUnregister ======== */ Void InterruptEve_intUnregister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo) { Hwi_Handle hwiHandle; Int index; InterruptEve_FxnTable *table; if (remoteProcId == InterruptEve_hostProcId) { index = 0; } else if ((remoteProcId == InterruptEve_videoProcId) || (remoteProcId == InterruptEve_vpssProcId)) { index = 1; } else if (remoteProcId == InterruptEve_dspProcId) { index = 2; } else { Assert_isTrue(FALSE, ti_sdo_ipc_Ipc_A_internal); } /* Disable the mailbox interrupt source */ InterruptEve_intDisable(remoteProcId, intInfo); InterruptEve_module->numPlugged--; if (InterruptEve_module->numPlugged == 0) { /* Delete the Hwi */ hwiHandle = Hwi_getHandle(intInfo->intVectorId); Hwi_delete(&hwiHandle); } /* Clear the FxnTable entry for the remote processor */ table = &(InterruptEve_module->fxnTable[index]); table->func = NULL; table->arg = 0; }