diff --git a/packages/ti/sdo/ipc/family/vayu/InterruptIpu.xs b/packages/ti/sdo/ipc/family/vayu/InterruptIpu.xs
index 612f0d2e3bc56759d9d6c8176e0e29a5618a38d7..44d310d9ee8eb1774709a7ae82b1f17e667b5b43 100644 (file)
/*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2014 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
/*
* ======== InterruptIpu.xs ========
*
*/
-var BIOS = null;
-var Hwi = null;
-var Core = null;
-var Ipu = null;
-
/*
* ======== module$use ========
*/
function module$use()
{
- BIOS = xdc.useModule("ti.sysbios.BIOS");
- Hwi = xdc.useModule("ti.sysbios.family.arm.m3.Hwi");
- Core = xdc.useModule("ti.sysbios.family.arm.ducati.Core");
- Ipc = xdc.useModule("ti.sdo.ipc.Ipc");
- Ipu = xdc.useModule("ti.sdo.ipc.family.vayu.InterruptIpu");
- Xbar = xdc.useModule("ti.sysbios.hal.vayu.IntXbar");
- TableInit = xdc.useModule("ti.sdo.ipc.family.vayu.TableInit");
+ xdc.useModule("xdc.runtime.Assert");
+
+ xdc.useModule("ti.sysbios.BIOS");
+ xdc.useModule("ti.sysbios.family.arm.ducati.Core");
+ xdc.useModule("ti.sysbios.family.arm.m3.Hwi");
+ xdc.useModule("ti.sysbios.family.shared.vayu.IntXbar");
+
+ xdc.useModule("ti.sdo.ipc.family.vayu.NotifySetup");
+ xdc.useModule("ti.sdo.ipc.notifyDrivers.IInterrupt");
+ xdc.useModule("ti.sdo.utils.MultiProc");
+
+ var TableInit = xdc.useModule("ti.sdo.ipc.family.vayu.TableInit");
+
+ xdc.useModule("ti.sdo.ipc.family.vayu.NotifySetup");
/* Initisalize procIdTable */
- TableInit.initProcId(Ipu);
+ TableInit.initProcId(this);
/* Initialize mailboxTable */
- TableInit.generateTable(Ipu);
+ TableInit.generateTable(this);
- /* Initialize mailbox base address table */
- this.mailboxBaseAddr[0] = 0x9208B000; /* EVE1 Internal Mailbox 0 */
- this.mailboxBaseAddr[1] = 0x9208C000; /* EVE1 Internal Mailbox 1 */
- this.mailboxBaseAddr[2] = 0x9208D000; /* EVE1 Internal Mailbox 2 */
- this.mailboxBaseAddr[3] = 0x9218B000; /* EVE2 Internal Mailbox 0 */
- this.mailboxBaseAddr[4] = 0x9218C000; /* EVE2 Internal Mailbox 1 */
- this.mailboxBaseAddr[5] = 0x9218D000; /* EVE2 Internal Mailbox 2 */
- this.mailboxBaseAddr[6] = 0x9228B000; /* EVE3 Internal Mailbox 0 */
- this.mailboxBaseAddr[7] = 0x9228C000; /* EVE3 Internal Mailbox 1 */
- this.mailboxBaseAddr[8] = 0x9228D000; /* EVE3 Internal Mailbox 2 */
- this.mailboxBaseAddr[9] = 0x9238B000; /* EVE4 Internal Mailbox 0 */
- this.mailboxBaseAddr[10] = 0x9238C000; /* EVE4 Internal Mailbox 1 */
- this.mailboxBaseAddr[11] = 0x9238D000; /* EVE4 Internal Mailbox 2 */
- this.mailboxBaseAddr[12] = 0x48840000; /* System Mailbox 5 */
- this.mailboxBaseAddr[13] = 0x48842000; /* System Mailbox 6 */
- this.mailboxBaseAddr[14] = 0x48844000; /* System Mailbox 7 */
- this.mailboxBaseAddr[15] = 0x48846000; /* System Mailbox 8 */
+ /* Initialize mailbox base addrs */
+ if (this.mailboxBaseAddr[0] == undefined) {
+ this.mailboxBaseAddr[0] = 0x6208B000; /* EVE1 Internal Mailbox 0 */
+ }
+ if (this.mailboxBaseAddr[1] == undefined) {
+ this.mailboxBaseAddr[1] = 0x6208C000; /* EVE1 Internal Mailbox 1 */
+ }
+ if (this.mailboxBaseAddr[2] == undefined) {
+ this.mailboxBaseAddr[2] = 0; /* EVE1 Internal Mailbox 2 */
+ } else {
+ this.$logWarning("InterruptIpu.mailboxBaseAddr[2] is the EVE1 MBOX2, "
+ + "which is not used for IPU communication and should not be "
+ + "configured.", this);
+ }
+ if (this.mailboxBaseAddr[3] == undefined) {
+ this.mailboxBaseAddr[3] = 0x6218B000; /* EVE2 Internal Mailbox 0 */
+ }
+ if (this.mailboxBaseAddr[4] == undefined) {
+ this.mailboxBaseAddr[4] = 0x6218C000; /* EVE2 Internal Mailbox 1 */
+ }
+ if (this.mailboxBaseAddr[5] == undefined) {
+ this.mailboxBaseAddr[5] = 0; /* EVE2 Internal Mailbox 2 */
+ } else {
+ this.$logWarning("InterruptIpu.mailboxBaseAddr[5] is the EVE2 MBOX2, "
+ + "which is not used for IPU communication and should not be "
+ + "configured.", this);
+ }
+
+ if (this.mailboxBaseAddr[6] == undefined) {
+ this.mailboxBaseAddr[6] = 0x6228B000; /* EVE3 Internal Mailbox 0 */
+ }
+ if (this.mailboxBaseAddr[7] == undefined) {
+ this.mailboxBaseAddr[7] = 0x6228C000; /* EVE3 Internal Mailbox 1 */
+ }
+ if (this.mailboxBaseAddr[8] == undefined) {
+ this.mailboxBaseAddr[8] = 0; /* EVE3 Internal Mailbox 2 */
+ } else {
+ this.$logWarning("InterruptIpu.mailboxBaseAddr[8] is the EVE3 MBOX2, "
+ + "which is not used for IPU communication and should not be "
+ + "configured.", this);
+ }
+
+ if (this.mailboxBaseAddr[9] == undefined) {
+ this.mailboxBaseAddr[9] = 0x6238B000; /* EVE4 Internal Mailbox 0 */
+ }
+ if (this.mailboxBaseAddr[10] == undefined) {
+ this.mailboxBaseAddr[10] = 0x6238C000; /* EVE4 Internal Mailbox 1 */
+ }
+ if (this.mailboxBaseAddr[11] == undefined) {
+ this.mailboxBaseAddr[11] = 0; /* EVE4 Internal Mailbox 2 */
+ } else {
+ this.$logWarning("InterruptIpu.mailboxBaseAddr[11] is the EVE4 MBOX2, "
+ + "which is not used for IPU communication and should not be "
+ + "configured.", this);
+ }
+
+ if (this.mailboxBaseAddr[12] == undefined) {
+ this.mailboxBaseAddr[12] = 0x68840000; /* System Mailbox 5 */
+ }
+ if (this.mailboxBaseAddr[13] == undefined) {
+ this.mailboxBaseAddr[13] = 0x68842000; /* System Mailbox 6 */
+ }
+ if (this.mailboxBaseAddr[14] == undefined) {
+ this.mailboxBaseAddr[14] = 0x68844000; /* System Mailbox 7 */
+ }
+ if (this.mailboxBaseAddr[15] == undefined) {
+ this.mailboxBaseAddr[15] = 0x68846000; /* System Mailbox 8 */
+ }
/*
* In case of a spec change, follow the process shown below:
* ======== module$static$init ========
* Initialize module values.
*/
-function module$static$init(mod, params)
+function module$static$init(state, mod)
{
- var remoteProcId;
- var mbxId;
-
- for (remoteProcId = 0; remoteProcId < Ipu.procIdTable.length; remoteProcId++) {
- mod.fxnTable[remoteProcId].func = null;
- mod.fxnTable[remoteProcId].arg = 0;
- }
-
- for (mbxId = 0; mbxId < Ipu.mailboxBaseAddr.length; mbxId++) {
- mod.numPlugged[mbxId] = 0;
- }
-
- /* Initialize Interrupt Event Ids for communicating with this processor */
- if (Core.id == 0) {
- mod.interruptTable[0] = 64; /* EVE1 */
- mod.interruptTable[1] = 65; /* EVE2 */
- mod.interruptTable[2] = 67; /* EVE3 */
- mod.interruptTable[3] = 68; /* EVE4 */
-
- /* These are not known at config time and is set a runtime */
- mod.interruptTable[4] = 0; /* DSP1 */
- mod.interruptTable[5] = 0; /* DSP2 */
- mod.interruptTable[6] = 0; /* Ipu1-0 */
- mod.interruptTable[7] = 0; /* Ipu2-0 */
- mod.interruptTable[8] = 0; /* HOST */
- mod.interruptTable[9] = 0; /* Ipu1-1 */
- mod.interruptTable[10] = 0; /* Ipu2-1 */
- }
- else {
- mod.interruptTable[0] = 71; /* EVE1 */
- mod.interruptTable[1] = 72; /* EVE2 */
- mod.interruptTable[2] = 74; /* EVE3 */
- mod.interruptTable[3] = 75; /* EVE4 */
-
- /* These are not known at config time and is set a runtime */
- mod.interruptTable[4] = 0; /* DSP1 */
- mod.interruptTable[5] = 0; /* DSP2 */
- mod.interruptTable[6] = 0; /* Ipu1-0 */
- mod.interruptTable[7] = 0; /* Ipu2-0 */
- mod.interruptTable[8] = 0; /* HOST */
- mod.interruptTable[9] = 0; /* Ipu1-1 */
- mod.interruptTable[10] = 0; /* Ipu2-1 */
-
+ for (var i = 0; i < this.procIdTable.length; i++) {
+ state.fxnTable[i].func = null;
+ state.fxnTable[i].arg = 0;
}
}