1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
33 34 35
36
37 /*!
38 * ======== Interrupt ========
39 * TCI66xx IPC interrupt manager
40 */
41
42 @ModuleStartup
43
44 module Interrupt inherits ti.sdo.ipc.notifyDrivers.IInterrupt
45 {
46
47 const UInt INVALIDPAYLOAD = 0xFFFFFFFF;
48
49 /*!
50 * ======== enableKick ========
51 * If set to 'true' IPC will unlock the KICK registers on C66x devices
52 *
53 * IPC unlocks the KICK registers on the local core if (and only if) all
54 * the following conditions are met:
55 * - This configuration is set to 'true'
56 * - SharedRegion #0 is valid and the local core is its owner
57 * - SharedRegion #0 is not valid and the local core is CORE0
58 */
59 config Bool enableKick = true;
60
61 /*!
62 * ======== Interrupt_intClearAll ========
63 * Clear all pending interrupts.
64 */
65 Void intClearAll();
66
67 /*!
68 * ======== Interrupt_checkAndClear =======
69 * Check to see that interrupt is set, if so clear it and return 1.
70 */
71 UInt checkAndClear(UInt16 remoteProcId, IntInfo *intInfo);
72
73 internal:
74
75 /*! Source ID bit position for CORE0 */
76 const UInt SRCS_BITPOS_CORE0 = 4;
77
78 /*! Source ID bit position for HOST */
79 const UInt SRCS_BITPOS_HOST = 31;
80
81 /*! Ptr to the IPC Generation Registers */
82 config Ptr IPCGR0;
83
84 /*! Ptr to the IPC Acknowledgment Registers */
85 config Ptr IPCAR0;
86
87 /*! Ptr to the IPC Host Generation Host Register */
88 config Ptr IPCGRH;
89
90 /*! Ptr to the IPC Acknowledgement Host Register */
91 config Ptr IPCARH;
92
93 /*! Ptr to the KICK0 Bootcfg Registers */
94 config Ptr KICK0;
95
96 /*! Ptr to the KICK1 Bootcfg Registers */
97 config Ptr KICK1;
98
99 /*! Inter-processor interrupt id (varies per device) */
100 config UInt INTERDSPINT;
101
102 /*! Vector interrupt id for Hwi_create */
103 config UInt DSPINT;
104
105 /*! Function table */
106 struct FxnTable {
107 Fxn func;
108 UArg arg;
109 }
110
111
112 /*!
113 * ======== isr ========
114 * Stub function plugged as interrupt handler
115 */
116 Void isr(UArg arg);
117
118 struct Module_State {
119 UInt numPlugged;
120 UInt16 clusterId;
121 FxnTable fxnTable[];
122 };
123 }