bfin_can.h 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. /*
  2. * bfin_can.h - interface to Blackfin CANs
  3. *
  4. * Copyright 2004-2009 Analog Devices Inc.
  5. *
  6. * Licensed under the GPL-2 or later.
  7. */
  8. #ifndef __ASM_BFIN_CAN_H__
  9. #define __ASM_BFIN_CAN_H__
  10. /*
  11. * transmit and receive channels
  12. */
  13. #define TRANSMIT_CHL 24
  14. #define RECEIVE_STD_CHL 0
  15. #define RECEIVE_EXT_CHL 4
  16. #define RECEIVE_RTR_CHL 8
  17. #define RECEIVE_EXT_RTR_CHL 12
  18. #define MAX_CHL_NUMBER 32
  19. /*
  20. * All Blackfin system MMRs are padded to 32bits even if the register
  21. * itself is only 16bits. So use a helper macro to streamline this.
  22. */
  23. #define __BFP(m) u16 m; u16 __pad_##m
  24. /*
  25. * bfin can registers layout
  26. */
  27. struct bfin_can_mask_regs {
  28. __BFP(aml);
  29. __BFP(amh);
  30. };
  31. struct bfin_can_channel_regs {
  32. /* data[0,2,4,6] -> data{0,1,2,3} while data[1,3,5,7] is padding */
  33. u16 data[8];
  34. __BFP(dlc);
  35. __BFP(tsv);
  36. __BFP(id0);
  37. __BFP(id1);
  38. };
  39. struct bfin_can_regs {
  40. /*
  41. * global control and status registers
  42. */
  43. __BFP(mc1); /* offset 0x00 */
  44. __BFP(md1); /* offset 0x04 */
  45. __BFP(trs1); /* offset 0x08 */
  46. __BFP(trr1); /* offset 0x0c */
  47. __BFP(ta1); /* offset 0x10 */
  48. __BFP(aa1); /* offset 0x14 */
  49. __BFP(rmp1); /* offset 0x18 */
  50. __BFP(rml1); /* offset 0x1c */
  51. __BFP(mbtif1); /* offset 0x20 */
  52. __BFP(mbrif1); /* offset 0x24 */
  53. __BFP(mbim1); /* offset 0x28 */
  54. __BFP(rfh1); /* offset 0x2c */
  55. __BFP(opss1); /* offset 0x30 */
  56. u32 __pad1[3];
  57. __BFP(mc2); /* offset 0x40 */
  58. __BFP(md2); /* offset 0x44 */
  59. __BFP(trs2); /* offset 0x48 */
  60. __BFP(trr2); /* offset 0x4c */
  61. __BFP(ta2); /* offset 0x50 */
  62. __BFP(aa2); /* offset 0x54 */
  63. __BFP(rmp2); /* offset 0x58 */
  64. __BFP(rml2); /* offset 0x5c */
  65. __BFP(mbtif2); /* offset 0x60 */
  66. __BFP(mbrif2); /* offset 0x64 */
  67. __BFP(mbim2); /* offset 0x68 */
  68. __BFP(rfh2); /* offset 0x6c */
  69. __BFP(opss2); /* offset 0x70 */
  70. u32 __pad2[3];
  71. __BFP(clock); /* offset 0x80 */
  72. __BFP(timing); /* offset 0x84 */
  73. __BFP(debug); /* offset 0x88 */
  74. __BFP(status); /* offset 0x8c */
  75. __BFP(cec); /* offset 0x90 */
  76. __BFP(gis); /* offset 0x94 */
  77. __BFP(gim); /* offset 0x98 */
  78. __BFP(gif); /* offset 0x9c */
  79. __BFP(control); /* offset 0xa0 */
  80. __BFP(intr); /* offset 0xa4 */
  81. __BFP(version); /* offset 0xa8 */
  82. __BFP(mbtd); /* offset 0xac */
  83. __BFP(ewr); /* offset 0xb0 */
  84. __BFP(esr); /* offset 0xb4 */
  85. u32 __pad3[2];
  86. __BFP(ucreg); /* offset 0xc0 */
  87. __BFP(uccnt); /* offset 0xc4 */
  88. __BFP(ucrc); /* offset 0xc8 */
  89. __BFP(uccnf); /* offset 0xcc */
  90. u32 __pad4[1];
  91. __BFP(version2); /* offset 0xd4 */
  92. u32 __pad5[10];
  93. /*
  94. * channel(mailbox) mask and message registers
  95. */
  96. struct bfin_can_mask_regs msk[MAX_CHL_NUMBER]; /* offset 0x100 */
  97. struct bfin_can_channel_regs chl[MAX_CHL_NUMBER]; /* offset 0x200 */
  98. };
  99. #undef __BFP
  100. /* CAN_CONTROL Masks */
  101. #define SRS 0x0001 /* Software Reset */
  102. #define DNM 0x0002 /* Device Net Mode */
  103. #define ABO 0x0004 /* Auto-Bus On Enable */
  104. #define TXPRIO 0x0008 /* TX Priority (Priority/Mailbox*) */
  105. #define WBA 0x0010 /* Wake-Up On CAN Bus Activity Enable */
  106. #define SMR 0x0020 /* Sleep Mode Request */
  107. #define CSR 0x0040 /* CAN Suspend Mode Request */
  108. #define CCR 0x0080 /* CAN Configuration Mode Request */
  109. /* CAN_STATUS Masks */
  110. #define WT 0x0001 /* TX Warning Flag */
  111. #define WR 0x0002 /* RX Warning Flag */
  112. #define EP 0x0004 /* Error Passive Mode */
  113. #define EBO 0x0008 /* Error Bus Off Mode */
  114. #define SMA 0x0020 /* Sleep Mode Acknowledge */
  115. #define CSA 0x0040 /* Suspend Mode Acknowledge */
  116. #define CCA 0x0080 /* Configuration Mode Acknowledge */
  117. #define MBPTR 0x1F00 /* Mailbox Pointer */
  118. #define TRM 0x4000 /* Transmit Mode */
  119. #define REC 0x8000 /* Receive Mode */
  120. /* CAN_CLOCK Masks */
  121. #define BRP 0x03FF /* Bit-Rate Pre-Scaler */
  122. /* CAN_TIMING Masks */
  123. #define TSEG1 0x000F /* Time Segment 1 */
  124. #define TSEG2 0x0070 /* Time Segment 2 */
  125. #define SAM 0x0080 /* Sampling */
  126. #define SJW 0x0300 /* Synchronization Jump Width */
  127. /* CAN_DEBUG Masks */
  128. #define DEC 0x0001 /* Disable CAN Error Counters */
  129. #define DRI 0x0002 /* Disable CAN RX Input */
  130. #define DTO 0x0004 /* Disable CAN TX Output */
  131. #define DIL 0x0008 /* Disable CAN Internal Loop */
  132. #define MAA 0x0010 /* Mode Auto-Acknowledge Enable */
  133. #define MRB 0x0020 /* Mode Read Back Enable */
  134. #define CDE 0x8000 /* CAN Debug Enable */
  135. /* CAN_CEC Masks */
  136. #define RXECNT 0x00FF /* Receive Error Counter */
  137. #define TXECNT 0xFF00 /* Transmit Error Counter */
  138. /* CAN_INTR Masks */
  139. #define MBRIRQ 0x0001 /* Mailbox Receive Interrupt */
  140. #define MBTIRQ 0x0002 /* Mailbox Transmit Interrupt */
  141. #define GIRQ 0x0004 /* Global Interrupt */
  142. #define SMACK 0x0008 /* Sleep Mode Acknowledge */
  143. #define CANTX 0x0040 /* CAN TX Bus Value */
  144. #define CANRX 0x0080 /* CAN RX Bus Value */
  145. /* CAN_MBxx_ID1 and CAN_MBxx_ID0 Masks */
  146. #define DFC 0xFFFF /* Data Filtering Code (If Enabled) (ID0) */
  147. #define EXTID_LO 0xFFFF /* Lower 16 Bits of Extended Identifier (ID0) */
  148. #define EXTID_HI 0x0003 /* Upper 2 Bits of Extended Identifier (ID1) */
  149. #define BASEID 0x1FFC /* Base Identifier */
  150. #define IDE 0x2000 /* Identifier Extension */
  151. #define RTR 0x4000 /* Remote Frame Transmission Request */
  152. #define AME 0x8000 /* Acceptance Mask Enable */
  153. /* CAN_MBxx_TIMESTAMP Masks */
  154. #define TSV 0xFFFF /* Timestamp */
  155. /* CAN_MBxx_LENGTH Masks */
  156. #define DLC 0x000F /* Data Length Code */
  157. /* CAN_AMxxH and CAN_AMxxL Masks */
  158. #define DFM 0xFFFF /* Data Field Mask (If Enabled) (CAN_AMxxL) */
  159. #define EXTID_LO 0xFFFF /* Lower 16 Bits of Extended Identifier (CAN_AMxxL) */
  160. #define EXTID_HI 0x0003 /* Upper 2 Bits of Extended Identifier (CAN_AMxxH) */
  161. #define BASEID 0x1FFC /* Base Identifier */
  162. #define AMIDE 0x2000 /* Acceptance Mask ID Extension Enable */
  163. #define FMD 0x4000 /* Full Mask Data Field Enable */
  164. #define FDF 0x8000 /* Filter On Data Field Enable */
  165. /* CAN_MC1 Masks */
  166. #define MC0 0x0001 /* Enable Mailbox 0 */
  167. #define MC1 0x0002 /* Enable Mailbox 1 */
  168. #define MC2 0x0004 /* Enable Mailbox 2 */
  169. #define MC3 0x0008 /* Enable Mailbox 3 */
  170. #define MC4 0x0010 /* Enable Mailbox 4 */
  171. #define MC5 0x0020 /* Enable Mailbox 5 */
  172. #define MC6 0x0040 /* Enable Mailbox 6 */
  173. #define MC7 0x0080 /* Enable Mailbox 7 */
  174. #define MC8 0x0100 /* Enable Mailbox 8 */
  175. #define MC9 0x0200 /* Enable Mailbox 9 */
  176. #define MC10 0x0400 /* Enable Mailbox 10 */
  177. #define MC11 0x0800 /* Enable Mailbox 11 */
  178. #define MC12 0x1000 /* Enable Mailbox 12 */
  179. #define MC13 0x2000 /* Enable Mailbox 13 */
  180. #define MC14 0x4000 /* Enable Mailbox 14 */
  181. #define MC15 0x8000 /* Enable Mailbox 15 */
  182. /* CAN_MC2 Masks */
  183. #define MC16 0x0001 /* Enable Mailbox 16 */
  184. #define MC17 0x0002 /* Enable Mailbox 17 */
  185. #define MC18 0x0004 /* Enable Mailbox 18 */
  186. #define MC19 0x0008 /* Enable Mailbox 19 */
  187. #define MC20 0x0010 /* Enable Mailbox 20 */
  188. #define MC21 0x0020 /* Enable Mailbox 21 */
  189. #define MC22 0x0040 /* Enable Mailbox 22 */
  190. #define MC23 0x0080 /* Enable Mailbox 23 */
  191. #define MC24 0x0100 /* Enable Mailbox 24 */
  192. #define MC25 0x0200 /* Enable Mailbox 25 */
  193. #define MC26 0x0400 /* Enable Mailbox 26 */
  194. #define MC27 0x0800 /* Enable Mailbox 27 */
  195. #define MC28 0x1000 /* Enable Mailbox 28 */
  196. #define MC29 0x2000 /* Enable Mailbox 29 */
  197. #define MC30 0x4000 /* Enable Mailbox 30 */
  198. #define MC31 0x8000 /* Enable Mailbox 31 */
  199. /* CAN_MD1 Masks */
  200. #define MD0 0x0001 /* Enable Mailbox 0 For Receive */
  201. #define MD1 0x0002 /* Enable Mailbox 1 For Receive */
  202. #define MD2 0x0004 /* Enable Mailbox 2 For Receive */
  203. #define MD3 0x0008 /* Enable Mailbox 3 For Receive */
  204. #define MD4 0x0010 /* Enable Mailbox 4 For Receive */
  205. #define MD5 0x0020 /* Enable Mailbox 5 For Receive */
  206. #define MD6 0x0040 /* Enable Mailbox 6 For Receive */
  207. #define MD7 0x0080 /* Enable Mailbox 7 For Receive */
  208. #define MD8 0x0100 /* Enable Mailbox 8 For Receive */
  209. #define MD9 0x0200 /* Enable Mailbox 9 For Receive */
  210. #define MD10 0x0400 /* Enable Mailbox 10 For Receive */
  211. #define MD11 0x0800 /* Enable Mailbox 11 For Receive */
  212. #define MD12 0x1000 /* Enable Mailbox 12 For Receive */
  213. #define MD13 0x2000 /* Enable Mailbox 13 For Receive */
  214. #define MD14 0x4000 /* Enable Mailbox 14 For Receive */
  215. #define MD15 0x8000 /* Enable Mailbox 15 For Receive */
  216. /* CAN_MD2 Masks */
  217. #define MD16 0x0001 /* Enable Mailbox 16 For Receive */
  218. #define MD17 0x0002 /* Enable Mailbox 17 For Receive */
  219. #define MD18 0x0004 /* Enable Mailbox 18 For Receive */
  220. #define MD19 0x0008 /* Enable Mailbox 19 For Receive */
  221. #define MD20 0x0010 /* Enable Mailbox 20 For Receive */
  222. #define MD21 0x0020 /* Enable Mailbox 21 For Receive */
  223. #define MD22 0x0040 /* Enable Mailbox 22 For Receive */
  224. #define MD23 0x0080 /* Enable Mailbox 23 For Receive */
  225. #define MD24 0x0100 /* Enable Mailbox 24 For Receive */
  226. #define MD25 0x0200 /* Enable Mailbox 25 For Receive */
  227. #define MD26 0x0400 /* Enable Mailbox 26 For Receive */
  228. #define MD27 0x0800 /* Enable Mailbox 27 For Receive */
  229. #define MD28 0x1000 /* Enable Mailbox 28 For Receive */
  230. #define MD29 0x2000 /* Enable Mailbox 29 For Receive */
  231. #define MD30 0x4000 /* Enable Mailbox 30 For Receive */
  232. #define MD31 0x8000 /* Enable Mailbox 31 For Receive */
  233. /* CAN_RMP1 Masks */
  234. #define RMP0 0x0001 /* RX Message Pending In Mailbox 0 */
  235. #define RMP1 0x0002 /* RX Message Pending In Mailbox 1 */
  236. #define RMP2 0x0004 /* RX Message Pending In Mailbox 2 */
  237. #define RMP3 0x0008 /* RX Message Pending In Mailbox 3 */
  238. #define RMP4 0x0010 /* RX Message Pending In Mailbox 4 */
  239. #define RMP5 0x0020 /* RX Message Pending In Mailbox 5 */
  240. #define RMP6 0x0040 /* RX Message Pending In Mailbox 6 */
  241. #define RMP7 0x0080 /* RX Message Pending In Mailbox 7 */
  242. #define RMP8 0x0100 /* RX Message Pending In Mailbox 8 */
  243. #define RMP9 0x0200 /* RX Message Pending In Mailbox 9 */
  244. #define RMP10 0x0400 /* RX Message Pending In Mailbox 10 */
  245. #define RMP11 0x0800 /* RX Message Pending In Mailbox 11 */
  246. #define RMP12 0x1000 /* RX Message Pending In Mailbox 12 */
  247. #define RMP13 0x2000 /* RX Message Pending In Mailbox 13 */
  248. #define RMP14 0x4000 /* RX Message Pending In Mailbox 14 */
  249. #define RMP15 0x8000 /* RX Message Pending In Mailbox 15 */
  250. /* CAN_RMP2 Masks */
  251. #define RMP16 0x0001 /* RX Message Pending In Mailbox 16 */
  252. #define RMP17 0x0002 /* RX Message Pending In Mailbox 17 */
  253. #define RMP18 0x0004 /* RX Message Pending In Mailbox 18 */
  254. #define RMP19 0x0008 /* RX Message Pending In Mailbox 19 */
  255. #define RMP20 0x0010 /* RX Message Pending In Mailbox 20 */
  256. #define RMP21 0x0020 /* RX Message Pending In Mailbox 21 */
  257. #define RMP22 0x0040 /* RX Message Pending In Mailbox 22 */
  258. #define RMP23 0x0080 /* RX Message Pending In Mailbox 23 */
  259. #define RMP24 0x0100 /* RX Message Pending In Mailbox 24 */
  260. #define RMP25 0x0200 /* RX Message Pending In Mailbox 25 */
  261. #define RMP26 0x0400 /* RX Message Pending In Mailbox 26 */
  262. #define RMP27 0x0800 /* RX Message Pending In Mailbox 27 */
  263. #define RMP28 0x1000 /* RX Message Pending In Mailbox 28 */
  264. #define RMP29 0x2000 /* RX Message Pending In Mailbox 29 */
  265. #define RMP30 0x4000 /* RX Message Pending In Mailbox 30 */
  266. #define RMP31 0x8000 /* RX Message Pending In Mailbox 31 */
  267. /* CAN_RML1 Masks */
  268. #define RML0 0x0001 /* RX Message Lost In Mailbox 0 */
  269. #define RML1 0x0002 /* RX Message Lost In Mailbox 1 */
  270. #define RML2 0x0004 /* RX Message Lost In Mailbox 2 */
  271. #define RML3 0x0008 /* RX Message Lost In Mailbox 3 */
  272. #define RML4 0x0010 /* RX Message Lost In Mailbox 4 */
  273. #define RML5 0x0020 /* RX Message Lost In Mailbox 5 */
  274. #define RML6 0x0040 /* RX Message Lost In Mailbox 6 */
  275. #define RML7 0x0080 /* RX Message Lost In Mailbox 7 */
  276. #define RML8 0x0100 /* RX Message Lost In Mailbox 8 */
  277. #define RML9 0x0200 /* RX Message Lost In Mailbox 9 */
  278. #define RML10 0x0400 /* RX Message Lost In Mailbox 10 */
  279. #define RML11 0x0800 /* RX Message Lost In Mailbox 11 */
  280. #define RML12 0x1000 /* RX Message Lost In Mailbox 12 */
  281. #define RML13 0x2000 /* RX Message Lost In Mailbox 13 */
  282. #define RML14 0x4000 /* RX Message Lost In Mailbox 14 */
  283. #define RML15 0x8000 /* RX Message Lost In Mailbox 15 */
  284. /* CAN_RML2 Masks */
  285. #define RML16 0x0001 /* RX Message Lost In Mailbox 16 */
  286. #define RML17 0x0002 /* RX Message Lost In Mailbox 17 */
  287. #define RML18 0x0004 /* RX Message Lost In Mailbox 18 */
  288. #define RML19 0x0008 /* RX Message Lost In Mailbox 19 */
  289. #define RML20 0x0010 /* RX Message Lost In Mailbox 20 */
  290. #define RML21 0x0020 /* RX Message Lost In Mailbox 21 */
  291. #define RML22 0x0040 /* RX Message Lost In Mailbox 22 */
  292. #define RML23 0x0080 /* RX Message Lost In Mailbox 23 */
  293. #define RML24 0x0100 /* RX Message Lost In Mailbox 24 */
  294. #define RML25 0x0200 /* RX Message Lost In Mailbox 25 */
  295. #define RML26 0x0400 /* RX Message Lost In Mailbox 26 */
  296. #define RML27 0x0800 /* RX Message Lost In Mailbox 27 */
  297. #define RML28 0x1000 /* RX Message Lost In Mailbox 28 */
  298. #define RML29 0x2000 /* RX Message Lost In Mailbox 29 */
  299. #define RML30 0x4000 /* RX Message Lost In Mailbox 30 */
  300. #define RML31 0x8000 /* RX Message Lost In Mailbox 31 */
  301. /* CAN_OPSS1 Masks */
  302. #define OPSS0 0x0001 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 0 */
  303. #define OPSS1 0x0002 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 1 */
  304. #define OPSS2 0x0004 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 2 */
  305. #define OPSS3 0x0008 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 3 */
  306. #define OPSS4 0x0010 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 4 */
  307. #define OPSS5 0x0020 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 5 */
  308. #define OPSS6 0x0040 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 6 */
  309. #define OPSS7 0x0080 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 7 */
  310. #define OPSS8 0x0100 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 8 */
  311. #define OPSS9 0x0200 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 9 */
  312. #define OPSS10 0x0400 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 10 */
  313. #define OPSS11 0x0800 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 11 */
  314. #define OPSS12 0x1000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 12 */
  315. #define OPSS13 0x2000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 13 */
  316. #define OPSS14 0x4000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 14 */
  317. #define OPSS15 0x8000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 15 */
  318. /* CAN_OPSS2 Masks */
  319. #define OPSS16 0x0001 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 16 */
  320. #define OPSS17 0x0002 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 17 */
  321. #define OPSS18 0x0004 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 18 */
  322. #define OPSS19 0x0008 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 19 */
  323. #define OPSS20 0x0010 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 20 */
  324. #define OPSS21 0x0020 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 21 */
  325. #define OPSS22 0x0040 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 22 */
  326. #define OPSS23 0x0080 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 23 */
  327. #define OPSS24 0x0100 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 24 */
  328. #define OPSS25 0x0200 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 25 */
  329. #define OPSS26 0x0400 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 26 */
  330. #define OPSS27 0x0800 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 27 */
  331. #define OPSS28 0x1000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 28 */
  332. #define OPSS29 0x2000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 29 */
  333. #define OPSS30 0x4000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 30 */
  334. #define OPSS31 0x8000 /* Enable RX Overwrite Protection or TX Single-Shot For Mailbox 31 */
  335. /* CAN_TRR1 Masks */
  336. #define TRR0 0x0001 /* Deny But Don't Lock Access To Mailbox 0 */
  337. #define TRR1 0x0002 /* Deny But Don't Lock Access To Mailbox 1 */
  338. #define TRR2 0x0004 /* Deny But Don't Lock Access To Mailbox 2 */
  339. #define TRR3 0x0008 /* Deny But Don't Lock Access To Mailbox 3 */
  340. #define TRR4 0x0010 /* Deny But Don't Lock Access To Mailbox 4 */
  341. #define TRR5 0x0020 /* Deny But Don't Lock Access To Mailbox 5 */
  342. #define TRR6 0x0040 /* Deny But Don't Lock Access To Mailbox 6 */
  343. #define TRR7 0x0080 /* Deny But Don't Lock Access To Mailbox 7 */
  344. #define TRR8 0x0100 /* Deny But Don't Lock Access To Mailbox 8 */
  345. #define TRR9 0x0200 /* Deny But Don't Lock Access To Mailbox 9 */
  346. #define TRR10 0x0400 /* Deny But Don't Lock Access To Mailbox 10 */
  347. #define TRR11 0x0800 /* Deny But Don't Lock Access To Mailbox 11 */
  348. #define TRR12 0x1000 /* Deny But Don't Lock Access To Mailbox 12 */
  349. #define TRR13 0x2000 /* Deny But Don't Lock Access To Mailbox 13 */
  350. #define TRR14 0x4000 /* Deny But Don't Lock Access To Mailbox 14 */
  351. #define TRR15 0x8000 /* Deny But Don't Lock Access To Mailbox 15 */
  352. /* CAN_TRR2 Masks */
  353. #define TRR16 0x0001 /* Deny But Don't Lock Access To Mailbox 16 */
  354. #define TRR17 0x0002 /* Deny But Don't Lock Access To Mailbox 17 */
  355. #define TRR18 0x0004 /* Deny But Don't Lock Access To Mailbox 18 */
  356. #define TRR19 0x0008 /* Deny But Don't Lock Access To Mailbox 19 */
  357. #define TRR20 0x0010 /* Deny But Don't Lock Access To Mailbox 20 */
  358. #define TRR21 0x0020 /* Deny But Don't Lock Access To Mailbox 21 */
  359. #define TRR22 0x0040 /* Deny But Don't Lock Access To Mailbox 22 */
  360. #define TRR23 0x0080 /* Deny But Don't Lock Access To Mailbox 23 */
  361. #define TRR24 0x0100 /* Deny But Don't Lock Access To Mailbox 24 */
  362. #define TRR25 0x0200 /* Deny But Don't Lock Access To Mailbox 25 */
  363. #define TRR26 0x0400 /* Deny But Don't Lock Access To Mailbox 26 */
  364. #define TRR27 0x0800 /* Deny But Don't Lock Access To Mailbox 27 */
  365. #define TRR28 0x1000 /* Deny But Don't Lock Access To Mailbox 28 */
  366. #define TRR29 0x2000 /* Deny But Don't Lock Access To Mailbox 29 */
  367. #define TRR30 0x4000 /* Deny But Don't Lock Access To Mailbox 30 */
  368. #define TRR31 0x8000 /* Deny But Don't Lock Access To Mailbox 31 */
  369. /* CAN_TRS1 Masks */
  370. #define TRS0 0x0001 /* Remote Frame Request For Mailbox 0 */
  371. #define TRS1 0x0002 /* Remote Frame Request For Mailbox 1 */
  372. #define TRS2 0x0004 /* Remote Frame Request For Mailbox 2 */
  373. #define TRS3 0x0008 /* Remote Frame Request For Mailbox 3 */
  374. #define TRS4 0x0010 /* Remote Frame Request For Mailbox 4 */
  375. #define TRS5 0x0020 /* Remote Frame Request For Mailbox 5 */
  376. #define TRS6 0x0040 /* Remote Frame Request For Mailbox 6 */
  377. #define TRS7 0x0080 /* Remote Frame Request For Mailbox 7 */
  378. #define TRS8 0x0100 /* Remote Frame Request For Mailbox 8 */
  379. #define TRS9 0x0200 /* Remote Frame Request For Mailbox 9 */
  380. #define TRS10 0x0400 /* Remote Frame Request For Mailbox 10 */
  381. #define TRS11 0x0800 /* Remote Frame Request For Mailbox 11 */
  382. #define TRS12 0x1000 /* Remote Frame Request For Mailbox 12 */
  383. #define TRS13 0x2000 /* Remote Frame Request For Mailbox 13 */
  384. #define TRS14 0x4000 /* Remote Frame Request For Mailbox 14 */
  385. #define TRS15 0x8000 /* Remote Frame Request For Mailbox 15 */
  386. /* CAN_TRS2 Masks */
  387. #define TRS16 0x0001 /* Remote Frame Request For Mailbox 16 */
  388. #define TRS17 0x0002 /* Remote Frame Request For Mailbox 17 */
  389. #define TRS18 0x0004 /* Remote Frame Request For Mailbox 18 */
  390. #define TRS19 0x0008 /* Remote Frame Request For Mailbox 19 */
  391. #define TRS20 0x0010 /* Remote Frame Request For Mailbox 20 */
  392. #define TRS21 0x0020 /* Remote Frame Request For Mailbox 21 */
  393. #define TRS22 0x0040 /* Remote Frame Request For Mailbox 22 */
  394. #define TRS23 0x0080 /* Remote Frame Request For Mailbox 23 */
  395. #define TRS24 0x0100 /* Remote Frame Request For Mailbox 24 */
  396. #define TRS25 0x0200 /* Remote Frame Request For Mailbox 25 */
  397. #define TRS26 0x0400 /* Remote Frame Request For Mailbox 26 */
  398. #define TRS27 0x0800 /* Remote Frame Request For Mailbox 27 */
  399. #define TRS28 0x1000 /* Remote Frame Request For Mailbox 28 */
  400. #define TRS29 0x2000 /* Remote Frame Request For Mailbox 29 */
  401. #define TRS30 0x4000 /* Remote Frame Request For Mailbox 30 */
  402. #define TRS31 0x8000 /* Remote Frame Request For Mailbox 31 */
  403. /* CAN_AA1 Masks */
  404. #define AA0 0x0001 /* Aborted Message In Mailbox 0 */
  405. #define AA1 0x0002 /* Aborted Message In Mailbox 1 */
  406. #define AA2 0x0004 /* Aborted Message In Mailbox 2 */
  407. #define AA3 0x0008 /* Aborted Message In Mailbox 3 */
  408. #define AA4 0x0010 /* Aborted Message In Mailbox 4 */
  409. #define AA5 0x0020 /* Aborted Message In Mailbox 5 */
  410. #define AA6 0x0040 /* Aborted Message In Mailbox 6 */
  411. #define AA7 0x0080 /* Aborted Message In Mailbox 7 */
  412. #define AA8 0x0100 /* Aborted Message In Mailbox 8 */
  413. #define AA9 0x0200 /* Aborted Message In Mailbox 9 */
  414. #define AA10 0x0400 /* Aborted Message In Mailbox 10 */
  415. #define AA11 0x0800 /* Aborted Message In Mailbox 11 */
  416. #define AA12 0x1000 /* Aborted Message In Mailbox 12 */
  417. #define AA13 0x2000 /* Aborted Message In Mailbox 13 */
  418. #define AA14 0x4000 /* Aborted Message In Mailbox 14 */
  419. #define AA15 0x8000 /* Aborted Message In Mailbox 15 */
  420. /* CAN_AA2 Masks */
  421. #define AA16 0x0001 /* Aborted Message In Mailbox 16 */
  422. #define AA17 0x0002 /* Aborted Message In Mailbox 17 */
  423. #define AA18 0x0004 /* Aborted Message In Mailbox 18 */
  424. #define AA19 0x0008 /* Aborted Message In Mailbox 19 */
  425. #define AA20 0x0010 /* Aborted Message In Mailbox 20 */
  426. #define AA21 0x0020 /* Aborted Message In Mailbox 21 */
  427. #define AA22 0x0040 /* Aborted Message In Mailbox 22 */
  428. #define AA23 0x0080 /* Aborted Message In Mailbox 23 */
  429. #define AA24 0x0100 /* Aborted Message In Mailbox 24 */
  430. #define AA25 0x0200 /* Aborted Message In Mailbox 25 */
  431. #define AA26 0x0400 /* Aborted Message In Mailbox 26 */
  432. #define AA27 0x0800 /* Aborted Message In Mailbox 27 */
  433. #define AA28 0x1000 /* Aborted Message In Mailbox 28 */
  434. #define AA29 0x2000 /* Aborted Message In Mailbox 29 */
  435. #define AA30 0x4000 /* Aborted Message In Mailbox 30 */
  436. #define AA31 0x8000 /* Aborted Message In Mailbox 31 */
  437. /* CAN_TA1 Masks */
  438. #define TA0 0x0001 /* Transmit Successful From Mailbox 0 */
  439. #define TA1 0x0002 /* Transmit Successful From Mailbox 1 */
  440. #define TA2 0x0004 /* Transmit Successful From Mailbox 2 */
  441. #define TA3 0x0008 /* Transmit Successful From Mailbox 3 */
  442. #define TA4 0x0010 /* Transmit Successful From Mailbox 4 */
  443. #define TA5 0x0020 /* Transmit Successful From Mailbox 5 */
  444. #define TA6 0x0040 /* Transmit Successful From Mailbox 6 */
  445. #define TA7 0x0080 /* Transmit Successful From Mailbox 7 */
  446. #define TA8 0x0100 /* Transmit Successful From Mailbox 8 */
  447. #define TA9 0x0200 /* Transmit Successful From Mailbox 9 */
  448. #define TA10 0x0400 /* Transmit Successful From Mailbox 10 */
  449. #define TA11 0x0800 /* Transmit Successful From Mailbox 11 */
  450. #define TA12 0x1000 /* Transmit Successful From Mailbox 12 */
  451. #define TA13 0x2000 /* Transmit Successful From Mailbox 13 */
  452. #define TA14 0x4000 /* Transmit Successful From Mailbox 14 */
  453. #define TA15 0x8000 /* Transmit Successful From Mailbox 15 */
  454. /* CAN_TA2 Masks */
  455. #define TA16 0x0001 /* Transmit Successful From Mailbox 16 */
  456. #define TA17 0x0002 /* Transmit Successful From Mailbox 17 */
  457. #define TA18 0x0004 /* Transmit Successful From Mailbox 18 */
  458. #define TA19 0x0008 /* Transmit Successful From Mailbox 19 */
  459. #define TA20 0x0010 /* Transmit Successful From Mailbox 20 */
  460. #define TA21 0x0020 /* Transmit Successful From Mailbox 21 */
  461. #define TA22 0x0040 /* Transmit Successful From Mailbox 22 */
  462. #define TA23 0x0080 /* Transmit Successful From Mailbox 23 */
  463. #define TA24 0x0100 /* Transmit Successful From Mailbox 24 */
  464. #define TA25 0x0200 /* Transmit Successful From Mailbox 25 */
  465. #define TA26 0x0400 /* Transmit Successful From Mailbox 26 */
  466. #define TA27 0x0800 /* Transmit Successful From Mailbox 27 */
  467. #define TA28 0x1000 /* Transmit Successful From Mailbox 28 */
  468. #define TA29 0x2000 /* Transmit Successful From Mailbox 29 */
  469. #define TA30 0x4000 /* Transmit Successful From Mailbox 30 */
  470. #define TA31 0x8000 /* Transmit Successful From Mailbox 31 */
  471. /* CAN_MBTD Masks */
  472. #define TDPTR 0x001F /* Mailbox To Temporarily Disable */
  473. #define TDA 0x0040 /* Temporary Disable Acknowledge */
  474. #define TDR 0x0080 /* Temporary Disable Request */
  475. /* CAN_RFH1 Masks */
  476. #define RFH0 0x0001 /* Enable Automatic Remote Frame Handling For Mailbox 0 */
  477. #define RFH1 0x0002 /* Enable Automatic Remote Frame Handling For Mailbox 1 */
  478. #define RFH2 0x0004 /* Enable Automatic Remote Frame Handling For Mailbox 2 */
  479. #define RFH3 0x0008 /* Enable Automatic Remote Frame Handling For Mailbox 3 */
  480. #define RFH4 0x0010 /* Enable Automatic Remote Frame Handling For Mailbox 4 */
  481. #define RFH5 0x0020 /* Enable Automatic Remote Frame Handling For Mailbox 5 */
  482. #define RFH6 0x0040 /* Enable Automatic Remote Frame Handling For Mailbox 6 */
  483. #define RFH7 0x0080 /* Enable Automatic Remote Frame Handling For Mailbox 7 */
  484. #define RFH8 0x0100 /* Enable Automatic Remote Frame Handling For Mailbox 8 */
  485. #define RFH9 0x0200 /* Enable Automatic Remote Frame Handling For Mailbox 9 */
  486. #define RFH10 0x0400 /* Enable Automatic Remote Frame Handling For Mailbox 10 */
  487. #define RFH11 0x0800 /* Enable Automatic Remote Frame Handling For Mailbox 11 */
  488. #define RFH12 0x1000 /* Enable Automatic Remote Frame Handling For Mailbox 12 */
  489. #define RFH13 0x2000 /* Enable Automatic Remote Frame Handling For Mailbox 13 */
  490. #define RFH14 0x4000 /* Enable Automatic Remote Frame Handling For Mailbox 14 */
  491. #define RFH15 0x8000 /* Enable Automatic Remote Frame Handling For Mailbox 15 */
  492. /* CAN_RFH2 Masks */
  493. #define RFH16 0x0001 /* Enable Automatic Remote Frame Handling For Mailbox 16 */
  494. #define RFH17 0x0002 /* Enable Automatic Remote Frame Handling For Mailbox 17 */
  495. #define RFH18 0x0004 /* Enable Automatic Remote Frame Handling For Mailbox 18 */
  496. #define RFH19 0x0008 /* Enable Automatic Remote Frame Handling For Mailbox 19 */
  497. #define RFH20 0x0010 /* Enable Automatic Remote Frame Handling For Mailbox 20 */
  498. #define RFH21 0x0020 /* Enable Automatic Remote Frame Handling For Mailbox 21 */
  499. #define RFH22 0x0040 /* Enable Automatic Remote Frame Handling For Mailbox 22 */
  500. #define RFH23 0x0080 /* Enable Automatic Remote Frame Handling For Mailbox 23 */
  501. #define RFH24 0x0100 /* Enable Automatic Remote Frame Handling For Mailbox 24 */
  502. #define RFH25 0x0200 /* Enable Automatic Remote Frame Handling For Mailbox 25 */
  503. #define RFH26 0x0400 /* Enable Automatic Remote Frame Handling For Mailbox 26 */
  504. #define RFH27 0x0800 /* Enable Automatic Remote Frame Handling For Mailbox 27 */
  505. #define RFH28 0x1000 /* Enable Automatic Remote Frame Handling For Mailbox 28 */
  506. #define RFH29 0x2000 /* Enable Automatic Remote Frame Handling For Mailbox 29 */
  507. #define RFH30 0x4000 /* Enable Automatic Remote Frame Handling For Mailbox 30 */
  508. #define RFH31 0x8000 /* Enable Automatic Remote Frame Handling For Mailbox 31 */
  509. /* CAN_MBTIF1 Masks */
  510. #define MBTIF0 0x0001 /* TX Interrupt Active In Mailbox 0 */
  511. #define MBTIF1 0x0002 /* TX Interrupt Active In Mailbox 1 */
  512. #define MBTIF2 0x0004 /* TX Interrupt Active In Mailbox 2 */
  513. #define MBTIF3 0x0008 /* TX Interrupt Active In Mailbox 3 */
  514. #define MBTIF4 0x0010 /* TX Interrupt Active In Mailbox 4 */
  515. #define MBTIF5 0x0020 /* TX Interrupt Active In Mailbox 5 */
  516. #define MBTIF6 0x0040 /* TX Interrupt Active In Mailbox 6 */
  517. #define MBTIF7 0x0080 /* TX Interrupt Active In Mailbox 7 */
  518. #define MBTIF8 0x0100 /* TX Interrupt Active In Mailbox 8 */
  519. #define MBTIF9 0x0200 /* TX Interrupt Active In Mailbox 9 */
  520. #define MBTIF10 0x0400 /* TX Interrupt Active In Mailbox 10 */
  521. #define MBTIF11 0x0800 /* TX Interrupt Active In Mailbox 11 */
  522. #define MBTIF12 0x1000 /* TX Interrupt Active In Mailbox 12 */
  523. #define MBTIF13 0x2000 /* TX Interrupt Active In Mailbox 13 */
  524. #define MBTIF14 0x4000 /* TX Interrupt Active In Mailbox 14 */
  525. #define MBTIF15 0x8000 /* TX Interrupt Active In Mailbox 15 */
  526. /* CAN_MBTIF2 Masks */
  527. #define MBTIF16 0x0001 /* TX Interrupt Active In Mailbox 16 */
  528. #define MBTIF17 0x0002 /* TX Interrupt Active In Mailbox 17 */
  529. #define MBTIF18 0x0004 /* TX Interrupt Active In Mailbox 18 */
  530. #define MBTIF19 0x0008 /* TX Interrupt Active In Mailbox 19 */
  531. #define MBTIF20 0x0010 /* TX Interrupt Active In Mailbox 20 */
  532. #define MBTIF21 0x0020 /* TX Interrupt Active In Mailbox 21 */
  533. #define MBTIF22 0x0040 /* TX Interrupt Active In Mailbox 22 */
  534. #define MBTIF23 0x0080 /* TX Interrupt Active In Mailbox 23 */
  535. #define MBTIF24 0x0100 /* TX Interrupt Active In Mailbox 24 */
  536. #define MBTIF25 0x0200 /* TX Interrupt Active In Mailbox 25 */
  537. #define MBTIF26 0x0400 /* TX Interrupt Active In Mailbox 26 */
  538. #define MBTIF27 0x0800 /* TX Interrupt Active In Mailbox 27 */
  539. #define MBTIF28 0x1000 /* TX Interrupt Active In Mailbox 28 */
  540. #define MBTIF29 0x2000 /* TX Interrupt Active In Mailbox 29 */
  541. #define MBTIF30 0x4000 /* TX Interrupt Active In Mailbox 30 */
  542. #define MBTIF31 0x8000 /* TX Interrupt Active In Mailbox 31 */
  543. /* CAN_MBRIF1 Masks */
  544. #define MBRIF0 0x0001 /* RX Interrupt Active In Mailbox 0 */
  545. #define MBRIF1 0x0002 /* RX Interrupt Active In Mailbox 1 */
  546. #define MBRIF2 0x0004 /* RX Interrupt Active In Mailbox 2 */
  547. #define MBRIF3 0x0008 /* RX Interrupt Active In Mailbox 3 */
  548. #define MBRIF4 0x0010 /* RX Interrupt Active In Mailbox 4 */
  549. #define MBRIF5 0x0020 /* RX Interrupt Active In Mailbox 5 */
  550. #define MBRIF6 0x0040 /* RX Interrupt Active In Mailbox 6 */
  551. #define MBRIF7 0x0080 /* RX Interrupt Active In Mailbox 7 */
  552. #define MBRIF8 0x0100 /* RX Interrupt Active In Mailbox 8 */
  553. #define MBRIF9 0x0200 /* RX Interrupt Active In Mailbox 9 */
  554. #define MBRIF10 0x0400 /* RX Interrupt Active In Mailbox 10 */
  555. #define MBRIF11 0x0800 /* RX Interrupt Active In Mailbox 11 */
  556. #define MBRIF12 0x1000 /* RX Interrupt Active In Mailbox 12 */
  557. #define MBRIF13 0x2000 /* RX Interrupt Active In Mailbox 13 */
  558. #define MBRIF14 0x4000 /* RX Interrupt Active In Mailbox 14 */
  559. #define MBRIF15 0x8000 /* RX Interrupt Active In Mailbox 15 */
  560. /* CAN_MBRIF2 Masks */
  561. #define MBRIF16 0x0001 /* RX Interrupt Active In Mailbox 16 */
  562. #define MBRIF17 0x0002 /* RX Interrupt Active In Mailbox 17 */
  563. #define MBRIF18 0x0004 /* RX Interrupt Active In Mailbox 18 */
  564. #define MBRIF19 0x0008 /* RX Interrupt Active In Mailbox 19 */
  565. #define MBRIF20 0x0010 /* RX Interrupt Active In Mailbox 20 */
  566. #define MBRIF21 0x0020 /* RX Interrupt Active In Mailbox 21 */
  567. #define MBRIF22 0x0040 /* RX Interrupt Active In Mailbox 22 */
  568. #define MBRIF23 0x0080 /* RX Interrupt Active In Mailbox 23 */
  569. #define MBRIF24 0x0100 /* RX Interrupt Active In Mailbox 24 */
  570. #define MBRIF25 0x0200 /* RX Interrupt Active In Mailbox 25 */
  571. #define MBRIF26 0x0400 /* RX Interrupt Active In Mailbox 26 */
  572. #define MBRIF27 0x0800 /* RX Interrupt Active In Mailbox 27 */
  573. #define MBRIF28 0x1000 /* RX Interrupt Active In Mailbox 28 */
  574. #define MBRIF29 0x2000 /* RX Interrupt Active In Mailbox 29 */
  575. #define MBRIF30 0x4000 /* RX Interrupt Active In Mailbox 30 */
  576. #define MBRIF31 0x8000 /* RX Interrupt Active In Mailbox 31 */
  577. /* CAN_MBIM1 Masks */
  578. #define MBIM0 0x0001 /* Enable Interrupt For Mailbox 0 */
  579. #define MBIM1 0x0002 /* Enable Interrupt For Mailbox 1 */
  580. #define MBIM2 0x0004 /* Enable Interrupt For Mailbox 2 */
  581. #define MBIM3 0x0008 /* Enable Interrupt For Mailbox 3 */
  582. #define MBIM4 0x0010 /* Enable Interrupt For Mailbox 4 */
  583. #define MBIM5 0x0020 /* Enable Interrupt For Mailbox 5 */
  584. #define MBIM6 0x0040 /* Enable Interrupt For Mailbox 6 */
  585. #define MBIM7 0x0080 /* Enable Interrupt For Mailbox 7 */
  586. #define MBIM8 0x0100 /* Enable Interrupt For Mailbox 8 */
  587. #define MBIM9 0x0200 /* Enable Interrupt For Mailbox 9 */
  588. #define MBIM10 0x0400 /* Enable Interrupt For Mailbox 10 */
  589. #define MBIM11 0x0800 /* Enable Interrupt For Mailbox 11 */
  590. #define MBIM12 0x1000 /* Enable Interrupt For Mailbox 12 */
  591. #define MBIM13 0x2000 /* Enable Interrupt For Mailbox 13 */
  592. #define MBIM14 0x4000 /* Enable Interrupt For Mailbox 14 */
  593. #define MBIM15 0x8000 /* Enable Interrupt For Mailbox 15 */
  594. /* CAN_MBIM2 Masks */
  595. #define MBIM16 0x0001 /* Enable Interrupt For Mailbox 16 */
  596. #define MBIM17 0x0002 /* Enable Interrupt For Mailbox 17 */
  597. #define MBIM18 0x0004 /* Enable Interrupt For Mailbox 18 */
  598. #define MBIM19 0x0008 /* Enable Interrupt For Mailbox 19 */
  599. #define MBIM20 0x0010 /* Enable Interrupt For Mailbox 20 */
  600. #define MBIM21 0x0020 /* Enable Interrupt For Mailbox 21 */
  601. #define MBIM22 0x0040 /* Enable Interrupt For Mailbox 22 */
  602. #define MBIM23 0x0080 /* Enable Interrupt For Mailbox 23 */
  603. #define MBIM24 0x0100 /* Enable Interrupt For Mailbox 24 */
  604. #define MBIM25 0x0200 /* Enable Interrupt For Mailbox 25 */
  605. #define MBIM26 0x0400 /* Enable Interrupt For Mailbox 26 */
  606. #define MBIM27 0x0800 /* Enable Interrupt For Mailbox 27 */
  607. #define MBIM28 0x1000 /* Enable Interrupt For Mailbox 28 */
  608. #define MBIM29 0x2000 /* Enable Interrupt For Mailbox 29 */
  609. #define MBIM30 0x4000 /* Enable Interrupt For Mailbox 30 */
  610. #define MBIM31 0x8000 /* Enable Interrupt For Mailbox 31 */
  611. /* CAN_GIM Masks */
  612. #define EWTIM 0x0001 /* Enable TX Error Count Interrupt */
  613. #define EWRIM 0x0002 /* Enable RX Error Count Interrupt */
  614. #define EPIM 0x0004 /* Enable Error-Passive Mode Interrupt */
  615. #define BOIM 0x0008 /* Enable Bus Off Interrupt */
  616. #define WUIM 0x0010 /* Enable Wake-Up Interrupt */
  617. #define UIAIM 0x0020 /* Enable Access To Unimplemented Address Interrupt */
  618. #define AAIM 0x0040 /* Enable Abort Acknowledge Interrupt */
  619. #define RMLIM 0x0080 /* Enable RX Message Lost Interrupt */
  620. #define UCEIM 0x0100 /* Enable Universal Counter Overflow Interrupt */
  621. #define EXTIM 0x0200 /* Enable External Trigger Output Interrupt */
  622. #define ADIM 0x0400 /* Enable Access Denied Interrupt */
  623. /* CAN_GIS Masks */
  624. #define EWTIS 0x0001 /* TX Error Count IRQ Status */
  625. #define EWRIS 0x0002 /* RX Error Count IRQ Status */
  626. #define EPIS 0x0004 /* Error-Passive Mode IRQ Status */
  627. #define BOIS 0x0008 /* Bus Off IRQ Status */
  628. #define WUIS 0x0010 /* Wake-Up IRQ Status */
  629. #define UIAIS 0x0020 /* Access To Unimplemented Address IRQ Status */
  630. #define AAIS 0x0040 /* Abort Acknowledge IRQ Status */
  631. #define RMLIS 0x0080 /* RX Message Lost IRQ Status */
  632. #define UCEIS 0x0100 /* Universal Counter Overflow IRQ Status */
  633. #define EXTIS 0x0200 /* External Trigger Output IRQ Status */
  634. #define ADIS 0x0400 /* Access Denied IRQ Status */
  635. /* CAN_GIF Masks */
  636. #define EWTIF 0x0001 /* TX Error Count IRQ Flag */
  637. #define EWRIF 0x0002 /* RX Error Count IRQ Flag */
  638. #define EPIF 0x0004 /* Error-Passive Mode IRQ Flag */
  639. #define BOIF 0x0008 /* Bus Off IRQ Flag */
  640. #define WUIF 0x0010 /* Wake-Up IRQ Flag */
  641. #define UIAIF 0x0020 /* Access To Unimplemented Address IRQ Flag */
  642. #define AAIF 0x0040 /* Abort Acknowledge IRQ Flag */
  643. #define RMLIF 0x0080 /* RX Message Lost IRQ Flag */
  644. #define UCEIF 0x0100 /* Universal Counter Overflow IRQ Flag */
  645. #define EXTIF 0x0200 /* External Trigger Output IRQ Flag */
  646. #define ADIF 0x0400 /* Access Denied IRQ Flag */
  647. /* CAN_UCCNF Masks */
  648. #define UCCNF 0x000F /* Universal Counter Mode */
  649. #define UC_STAMP 0x0001 /* Timestamp Mode */
  650. #define UC_WDOG 0x0002 /* Watchdog Mode */
  651. #define UC_AUTOTX 0x0003 /* Auto-Transmit Mode */
  652. #define UC_ERROR 0x0006 /* CAN Error Frame Count */
  653. #define UC_OVER 0x0007 /* CAN Overload Frame Count */
  654. #define UC_LOST 0x0008 /* Arbitration Lost During TX Count */
  655. #define UC_AA 0x0009 /* TX Abort Count */
  656. #define UC_TA 0x000A /* TX Successful Count */
  657. #define UC_REJECT 0x000B /* RX Message Rejected Count */
  658. #define UC_RML 0x000C /* RX Message Lost Count */
  659. #define UC_RX 0x000D /* Total Successful RX Messages Count */
  660. #define UC_RMP 0x000E /* Successful RX W/Matching ID Count */
  661. #define UC_ALL 0x000F /* Correct Message On CAN Bus Line Count */
  662. #define UCRC 0x0020 /* Universal Counter Reload/Clear */
  663. #define UCCT 0x0040 /* Universal Counter CAN Trigger */
  664. #define UCE 0x0080 /* Universal Counter Enable */
  665. /* CAN_ESR Masks */
  666. #define ACKE 0x0004 /* Acknowledge Error */
  667. #define SER 0x0008 /* Stuff Error */
  668. #define CRCE 0x0010 /* CRC Error */
  669. #define SA0 0x0020 /* Stuck At Dominant Error */
  670. #define BEF 0x0040 /* Bit Error Flag */
  671. #define FER 0x0080 /* Form Error Flag */
  672. /* CAN_EWR Masks */
  673. #define EWLREC 0x00FF /* RX Error Count Limit (For EWRIS) */
  674. #define EWLTEC 0xFF00 /* TX Error Count Limit (For EWTIS) */
  675. #endif