]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blobdiff - packages/ti/ipc/family/tci6638/Interrupt.xs
am65xx: Remove dependence on DEVMEM entry
[ipc/ipcdev.git] / packages / ti / ipc / family / tci6638 / Interrupt.xs
index e02afb10585f76076c10f502625a9d9e03d70c91..4b07a648075f46f94b7135a0de6859176fc15f46 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
+
 /*
  *  ======== Interrupt.xs ========
  */
 
-var deviceSettings = {
-    'Kepler' : {
-        IPCGR0:         0x02620240,
-        IPCAR0:         0x02620280,
-        IPCGRH:         0x02620260,
-        IPCARH:         0x026202A0,
-        KICK0:          0x02620038,
-        KICK1:          0x0262003C,
-        INTERDSPINT:    105,
-        DSPINT:         5,
-    },
-    'TMS320TCI6638' : {
-        IPCGR0:         0x02620240,
-        IPCAR0:         0x02620280,
-        IPCGRH:         0x02620260,
-        IPCARH:         0x026202A0,
-        KICK0:          0x02620038,
-        KICK1:          0x0262003C,
-        INTERDSPINT:    105,
-        DSPINT:         5,
-    },
-}
-var Settings = xdc.loadCapsule('ti/sdo/ipc/family/Settings.xs');
-Settings.setDeviceAliases(deviceSettings, Settings.deviceAliases);
-var Hwi         = null;
-var Interrupt = null;
-var MultiProc   = null;
-
-/*
- *  ======== module$meta$init ========
- */
-function module$meta$init()
-{
-    /* Only process during "cfg" phase */
-    if (xdc.om.$name != "cfg") {
-        return;
-    }
-
-    var settings = deviceSettings[Program.cpu.deviceName];
-
-    this.IPCGR0         = settings.IPCGR0;
-    this.IPCAR0         = settings.IPCAR0;
-    this.IPCGRH         = settings.IPCGRH;
-    this.IPCARH         = settings.IPCARH;
-    this.KICK0          = settings.KICK0;
-    this.KICK1          = settings.KICK1;
-    this.INTERDSPINT    = settings.INTERDSPINT;
-    this.DSPINT         = settings.DSPINT;
-}
 /*
  *  ======== module$use ========
  */
 function module$use()
 {
-    Interrupt     = this;
+    xdc.useModule('xdc.runtime.Assert');
+    xdc.useModule('ti.sdo.ipc.notifyDrivers.IInterrupt');
 
-    Hwi         = xdc.useModule("ti.sysbios.family.c64p.Hwi");
-    MultiProc   = xdc.useModule("ti.sdo.utils.MultiProc");
-}
+    this.$logWarning("This module has been deprecated. To eliminate "
+        + "this warning, remove \"xdc.useModule('" + this.$name + "')\" "
+        + "from your application configuration script. The correct "
+        + "interrupt delegate will be included automatically.", this);
 
-/*
- *  ======== module$static$init ========
- */
-function module$static$init(mod, params)
-{
-    var fxnTable = Interrupt.$object.fxnTable;
+    /*  If the NotifyDriverCirc module was used, assume that this module
+     *  was assigned as the delegate for the interrupt proxy. Override that
+     *  assignment with the correct delegate.
+     */
+    var driver = "ti.sdo.ipc.notifyDrivers.NotifyDriverCirc";
 
-    /* The function table length should be the number of IPCAR bits */
-    fxnTable.length = 32;
-    for (var i = 0; i < fxnTable.length; i++) {
-        fxnTable[i].func = null;
-        fxnTable[i].arg = 0;
+    if (driver in xdc.om) {
+        var NotifyDriverCirc = xdc.module(driver);
+        if (NotifyDriverCirc.$used) {
+            NotifyDriverCirc.InterruptProxy =
+                    xdc.useModule('ti.sdo.ipc.family.tci663x.Interrupt');
+        }
     }
 
-    mod.numPlugged = 0;
+    if (this.$written("enableKick")) {
+        this.$logWarning("The configuration parameter 'enableKick' has "
+            + "been deprecated. Please refer to the interrupt delegate "
+            + "for more information.", this);
+    }
 }