/* * ======== Interrupt_Module_startup ======== */ Int Interrupt_Module_startup(Int phase) { volatile UInt32 *kick0 = (volatile UInt32 *)Interrupt_KICK0; volatile UInt32 *kick1 = (volatile UInt32 *)Interrupt_KICK1; UInt16 procId = MultiProc_self(); /* * If this assert fails, the MultiProc config has changed to break * an assumption in Linux rpmsg driver, that HOST is listed first in * MultiProc ID configuration. */ Assert_isTrue(0 == MultiProc_getId("HOST"), NULL); /* * Wait for Startup to be done (if MultiProc id not yet set) because a * user fxn should set it */ if (!Startup_Module_startupDone() && procId == MultiProc_INVALIDID) { return (Startup_NOTDONE); } if (!Interrupt_enableKick) { /* Do not unlock the kick registers */ return (Startup_DONE); } /* * Only write to the KICK registers if: * - This core is the SR0 owner * - There is no SR0 and this core has procId '1' (IPC 3.x: this case). */ /* TODO: What if CORE0 is not started, but the others are? */ if (DNUM == 0) { if (Interrupt_KICK0 && Interrupt_KICK1){ /* unlock the KICK mechanism in the Bootcfg MMRs if defined */ kick0[0] = 0x83e70b13; /* must be written with this value */ kick1[0] = 0x95a4f1e0; /* must be written with this value */ } } return (Startup_DONE); }
/* * ======== ti_sdo_ipc_Notify_Module_startup ======== */ Int ti_sdo_ipc_Notify_Module_startup(Int phase) { UInt16 procId = MultiProc_self(); /* * Wait for Startup to be done (if MultiProc id not yet set) because a * user fxn may set it */ if (!Startup_Module_startupDone() && procId == MultiProc_INVALIDID) { return (Startup_NOTDONE); } /* Ensure that the MultiProc ID has been configured */ Assert_isTrue(procId != MultiProc_INVALIDID, ti_sdo_utils_MultiProc_A_invalidMultiProcId); /* Create a local instance */ ti_sdo_ipc_Notify_create(NULL, procId, 0, NULL, NULL); return (Startup_DONE); }