gio_defs.h 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
  1. #ifndef __gio_defs_h
  2. #define __gio_defs_h
  3. /*
  4. * This file is autogenerated from
  5. * file: gio.r
  6. *
  7. * by ../../../tools/rdesc/bin/rdes2c -outfile gio_defs.h gio.r
  8. * Any changes here will be lost.
  9. *
  10. * -*- buffer-read-only: t -*-
  11. */
  12. /* Main access macros */
  13. #ifndef REG_RD
  14. #define REG_RD( scope, inst, reg ) \
  15. REG_READ( reg_##scope##_##reg, \
  16. (inst) + REG_RD_ADDR_##scope##_##reg )
  17. #endif
  18. #ifndef REG_WR
  19. #define REG_WR( scope, inst, reg, val ) \
  20. REG_WRITE( reg_##scope##_##reg, \
  21. (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
  22. #endif
  23. #ifndef REG_RD_VECT
  24. #define REG_RD_VECT( scope, inst, reg, index ) \
  25. REG_READ( reg_##scope##_##reg, \
  26. (inst) + REG_RD_ADDR_##scope##_##reg + \
  27. (index) * STRIDE_##scope##_##reg )
  28. #endif
  29. #ifndef REG_WR_VECT
  30. #define REG_WR_VECT( scope, inst, reg, index, val ) \
  31. REG_WRITE( reg_##scope##_##reg, \
  32. (inst) + REG_WR_ADDR_##scope##_##reg + \
  33. (index) * STRIDE_##scope##_##reg, (val) )
  34. #endif
  35. #ifndef REG_RD_INT
  36. #define REG_RD_INT( scope, inst, reg ) \
  37. REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
  38. #endif
  39. #ifndef REG_WR_INT
  40. #define REG_WR_INT( scope, inst, reg, val ) \
  41. REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
  42. #endif
  43. #ifndef REG_RD_INT_VECT
  44. #define REG_RD_INT_VECT( scope, inst, reg, index ) \
  45. REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
  46. (index) * STRIDE_##scope##_##reg )
  47. #endif
  48. #ifndef REG_WR_INT_VECT
  49. #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
  50. REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
  51. (index) * STRIDE_##scope##_##reg, (val) )
  52. #endif
  53. #ifndef REG_TYPE_CONV
  54. #define REG_TYPE_CONV( type, orgtype, val ) \
  55. ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
  56. #endif
  57. #ifndef reg_page_size
  58. #define reg_page_size 8192
  59. #endif
  60. #ifndef REG_ADDR
  61. #define REG_ADDR( scope, inst, reg ) \
  62. ( (inst) + REG_RD_ADDR_##scope##_##reg )
  63. #endif
  64. #ifndef REG_ADDR_VECT
  65. #define REG_ADDR_VECT( scope, inst, reg, index ) \
  66. ( (inst) + REG_RD_ADDR_##scope##_##reg + \
  67. (index) * STRIDE_##scope##_##reg )
  68. #endif
  69. /* C-code for register scope gio */
  70. /* Register r_pa_din, scope gio, type r */
  71. typedef struct {
  72. unsigned int data : 32;
  73. } reg_gio_r_pa_din;
  74. #define REG_RD_ADDR_gio_r_pa_din 0
  75. /* Register rw_pa_dout, scope gio, type rw */
  76. typedef struct {
  77. unsigned int data : 32;
  78. } reg_gio_rw_pa_dout;
  79. #define REG_RD_ADDR_gio_rw_pa_dout 4
  80. #define REG_WR_ADDR_gio_rw_pa_dout 4
  81. /* Register rw_pa_oe, scope gio, type rw */
  82. typedef struct {
  83. unsigned int oe : 32;
  84. } reg_gio_rw_pa_oe;
  85. #define REG_RD_ADDR_gio_rw_pa_oe 8
  86. #define REG_WR_ADDR_gio_rw_pa_oe 8
  87. /* Register rw_pa_byte0_dout, scope gio, type rw */
  88. typedef struct {
  89. unsigned int data : 8;
  90. unsigned int dummy1 : 24;
  91. } reg_gio_rw_pa_byte0_dout;
  92. #define REG_RD_ADDR_gio_rw_pa_byte0_dout 12
  93. #define REG_WR_ADDR_gio_rw_pa_byte0_dout 12
  94. /* Register rw_pa_byte0_oe, scope gio, type rw */
  95. typedef struct {
  96. unsigned int oe : 8;
  97. unsigned int dummy1 : 24;
  98. } reg_gio_rw_pa_byte0_oe;
  99. #define REG_RD_ADDR_gio_rw_pa_byte0_oe 16
  100. #define REG_WR_ADDR_gio_rw_pa_byte0_oe 16
  101. /* Register rw_pa_byte1_dout, scope gio, type rw */
  102. typedef struct {
  103. unsigned int data : 8;
  104. unsigned int dummy1 : 24;
  105. } reg_gio_rw_pa_byte1_dout;
  106. #define REG_RD_ADDR_gio_rw_pa_byte1_dout 20
  107. #define REG_WR_ADDR_gio_rw_pa_byte1_dout 20
  108. /* Register rw_pa_byte1_oe, scope gio, type rw */
  109. typedef struct {
  110. unsigned int oe : 8;
  111. unsigned int dummy1 : 24;
  112. } reg_gio_rw_pa_byte1_oe;
  113. #define REG_RD_ADDR_gio_rw_pa_byte1_oe 24
  114. #define REG_WR_ADDR_gio_rw_pa_byte1_oe 24
  115. /* Register rw_pa_byte2_dout, scope gio, type rw */
  116. typedef struct {
  117. unsigned int data : 8;
  118. unsigned int dummy1 : 24;
  119. } reg_gio_rw_pa_byte2_dout;
  120. #define REG_RD_ADDR_gio_rw_pa_byte2_dout 28
  121. #define REG_WR_ADDR_gio_rw_pa_byte2_dout 28
  122. /* Register rw_pa_byte2_oe, scope gio, type rw */
  123. typedef struct {
  124. unsigned int oe : 8;
  125. unsigned int dummy1 : 24;
  126. } reg_gio_rw_pa_byte2_oe;
  127. #define REG_RD_ADDR_gio_rw_pa_byte2_oe 32
  128. #define REG_WR_ADDR_gio_rw_pa_byte2_oe 32
  129. /* Register rw_pa_byte3_dout, scope gio, type rw */
  130. typedef struct {
  131. unsigned int data : 8;
  132. unsigned int dummy1 : 24;
  133. } reg_gio_rw_pa_byte3_dout;
  134. #define REG_RD_ADDR_gio_rw_pa_byte3_dout 36
  135. #define REG_WR_ADDR_gio_rw_pa_byte3_dout 36
  136. /* Register rw_pa_byte3_oe, scope gio, type rw */
  137. typedef struct {
  138. unsigned int oe : 8;
  139. unsigned int dummy1 : 24;
  140. } reg_gio_rw_pa_byte3_oe;
  141. #define REG_RD_ADDR_gio_rw_pa_byte3_oe 40
  142. #define REG_WR_ADDR_gio_rw_pa_byte3_oe 40
  143. /* Register r_pb_din, scope gio, type r */
  144. typedef struct {
  145. unsigned int data : 32;
  146. } reg_gio_r_pb_din;
  147. #define REG_RD_ADDR_gio_r_pb_din 44
  148. /* Register rw_pb_dout, scope gio, type rw */
  149. typedef struct {
  150. unsigned int data : 32;
  151. } reg_gio_rw_pb_dout;
  152. #define REG_RD_ADDR_gio_rw_pb_dout 48
  153. #define REG_WR_ADDR_gio_rw_pb_dout 48
  154. /* Register rw_pb_oe, scope gio, type rw */
  155. typedef struct {
  156. unsigned int oe : 32;
  157. } reg_gio_rw_pb_oe;
  158. #define REG_RD_ADDR_gio_rw_pb_oe 52
  159. #define REG_WR_ADDR_gio_rw_pb_oe 52
  160. /* Register rw_pb_byte0_dout, scope gio, type rw */
  161. typedef struct {
  162. unsigned int data : 8;
  163. unsigned int dummy1 : 24;
  164. } reg_gio_rw_pb_byte0_dout;
  165. #define REG_RD_ADDR_gio_rw_pb_byte0_dout 56
  166. #define REG_WR_ADDR_gio_rw_pb_byte0_dout 56
  167. /* Register rw_pb_byte0_oe, scope gio, type rw */
  168. typedef struct {
  169. unsigned int oe : 8;
  170. unsigned int dummy1 : 24;
  171. } reg_gio_rw_pb_byte0_oe;
  172. #define REG_RD_ADDR_gio_rw_pb_byte0_oe 60
  173. #define REG_WR_ADDR_gio_rw_pb_byte0_oe 60
  174. /* Register rw_pb_byte1_dout, scope gio, type rw */
  175. typedef struct {
  176. unsigned int data : 8;
  177. unsigned int dummy1 : 24;
  178. } reg_gio_rw_pb_byte1_dout;
  179. #define REG_RD_ADDR_gio_rw_pb_byte1_dout 64
  180. #define REG_WR_ADDR_gio_rw_pb_byte1_dout 64
  181. /* Register rw_pb_byte1_oe, scope gio, type rw */
  182. typedef struct {
  183. unsigned int oe : 8;
  184. unsigned int dummy1 : 24;
  185. } reg_gio_rw_pb_byte1_oe;
  186. #define REG_RD_ADDR_gio_rw_pb_byte1_oe 68
  187. #define REG_WR_ADDR_gio_rw_pb_byte1_oe 68
  188. /* Register rw_pb_byte2_dout, scope gio, type rw */
  189. typedef struct {
  190. unsigned int data : 8;
  191. unsigned int dummy1 : 24;
  192. } reg_gio_rw_pb_byte2_dout;
  193. #define REG_RD_ADDR_gio_rw_pb_byte2_dout 72
  194. #define REG_WR_ADDR_gio_rw_pb_byte2_dout 72
  195. /* Register rw_pb_byte2_oe, scope gio, type rw */
  196. typedef struct {
  197. unsigned int oe : 8;
  198. unsigned int dummy1 : 24;
  199. } reg_gio_rw_pb_byte2_oe;
  200. #define REG_RD_ADDR_gio_rw_pb_byte2_oe 76
  201. #define REG_WR_ADDR_gio_rw_pb_byte2_oe 76
  202. /* Register rw_pb_byte3_dout, scope gio, type rw */
  203. typedef struct {
  204. unsigned int data : 8;
  205. unsigned int dummy1 : 24;
  206. } reg_gio_rw_pb_byte3_dout;
  207. #define REG_RD_ADDR_gio_rw_pb_byte3_dout 80
  208. #define REG_WR_ADDR_gio_rw_pb_byte3_dout 80
  209. /* Register rw_pb_byte3_oe, scope gio, type rw */
  210. typedef struct {
  211. unsigned int oe : 8;
  212. unsigned int dummy1 : 24;
  213. } reg_gio_rw_pb_byte3_oe;
  214. #define REG_RD_ADDR_gio_rw_pb_byte3_oe 84
  215. #define REG_WR_ADDR_gio_rw_pb_byte3_oe 84
  216. /* Register r_pc_din, scope gio, type r */
  217. typedef struct {
  218. unsigned int data : 16;
  219. unsigned int dummy1 : 16;
  220. } reg_gio_r_pc_din;
  221. #define REG_RD_ADDR_gio_r_pc_din 88
  222. /* Register rw_pc_dout, scope gio, type rw */
  223. typedef struct {
  224. unsigned int data : 16;
  225. unsigned int dummy1 : 16;
  226. } reg_gio_rw_pc_dout;
  227. #define REG_RD_ADDR_gio_rw_pc_dout 92
  228. #define REG_WR_ADDR_gio_rw_pc_dout 92
  229. /* Register rw_pc_oe, scope gio, type rw */
  230. typedef struct {
  231. unsigned int oe : 16;
  232. unsigned int dummy1 : 16;
  233. } reg_gio_rw_pc_oe;
  234. #define REG_RD_ADDR_gio_rw_pc_oe 96
  235. #define REG_WR_ADDR_gio_rw_pc_oe 96
  236. /* Register rw_pc_byte0_dout, scope gio, type rw */
  237. typedef struct {
  238. unsigned int data : 8;
  239. unsigned int dummy1 : 24;
  240. } reg_gio_rw_pc_byte0_dout;
  241. #define REG_RD_ADDR_gio_rw_pc_byte0_dout 100
  242. #define REG_WR_ADDR_gio_rw_pc_byte0_dout 100
  243. /* Register rw_pc_byte0_oe, scope gio, type rw */
  244. typedef struct {
  245. unsigned int oe : 8;
  246. unsigned int dummy1 : 24;
  247. } reg_gio_rw_pc_byte0_oe;
  248. #define REG_RD_ADDR_gio_rw_pc_byte0_oe 104
  249. #define REG_WR_ADDR_gio_rw_pc_byte0_oe 104
  250. /* Register rw_pc_byte1_dout, scope gio, type rw */
  251. typedef struct {
  252. unsigned int data : 8;
  253. unsigned int dummy1 : 24;
  254. } reg_gio_rw_pc_byte1_dout;
  255. #define REG_RD_ADDR_gio_rw_pc_byte1_dout 108
  256. #define REG_WR_ADDR_gio_rw_pc_byte1_dout 108
  257. /* Register rw_pc_byte1_oe, scope gio, type rw */
  258. typedef struct {
  259. unsigned int oe : 8;
  260. unsigned int dummy1 : 24;
  261. } reg_gio_rw_pc_byte1_oe;
  262. #define REG_RD_ADDR_gio_rw_pc_byte1_oe 112
  263. #define REG_WR_ADDR_gio_rw_pc_byte1_oe 112
  264. /* Register r_pd_din, scope gio, type r */
  265. typedef struct {
  266. unsigned int data : 32;
  267. } reg_gio_r_pd_din;
  268. #define REG_RD_ADDR_gio_r_pd_din 116
  269. /* Register rw_intr_cfg, scope gio, type rw */
  270. typedef struct {
  271. unsigned int intr0 : 3;
  272. unsigned int intr1 : 3;
  273. unsigned int intr2 : 3;
  274. unsigned int intr3 : 3;
  275. unsigned int intr4 : 3;
  276. unsigned int intr5 : 3;
  277. unsigned int intr6 : 3;
  278. unsigned int intr7 : 3;
  279. unsigned int dummy1 : 8;
  280. } reg_gio_rw_intr_cfg;
  281. #define REG_RD_ADDR_gio_rw_intr_cfg 120
  282. #define REG_WR_ADDR_gio_rw_intr_cfg 120
  283. /* Register rw_intr_pins, scope gio, type rw */
  284. typedef struct {
  285. unsigned int intr0 : 4;
  286. unsigned int intr1 : 4;
  287. unsigned int intr2 : 4;
  288. unsigned int intr3 : 4;
  289. unsigned int intr4 : 4;
  290. unsigned int intr5 : 4;
  291. unsigned int intr6 : 4;
  292. unsigned int intr7 : 4;
  293. } reg_gio_rw_intr_pins;
  294. #define REG_RD_ADDR_gio_rw_intr_pins 124
  295. #define REG_WR_ADDR_gio_rw_intr_pins 124
  296. /* Register rw_intr_mask, scope gio, type rw */
  297. typedef struct {
  298. unsigned int intr0 : 1;
  299. unsigned int intr1 : 1;
  300. unsigned int intr2 : 1;
  301. unsigned int intr3 : 1;
  302. unsigned int intr4 : 1;
  303. unsigned int intr5 : 1;
  304. unsigned int intr6 : 1;
  305. unsigned int intr7 : 1;
  306. unsigned int i2c0_done : 1;
  307. unsigned int i2c1_done : 1;
  308. unsigned int dummy1 : 22;
  309. } reg_gio_rw_intr_mask;
  310. #define REG_RD_ADDR_gio_rw_intr_mask 128
  311. #define REG_WR_ADDR_gio_rw_intr_mask 128
  312. /* Register rw_ack_intr, scope gio, type rw */
  313. typedef struct {
  314. unsigned int intr0 : 1;
  315. unsigned int intr1 : 1;
  316. unsigned int intr2 : 1;
  317. unsigned int intr3 : 1;
  318. unsigned int intr4 : 1;
  319. unsigned int intr5 : 1;
  320. unsigned int intr6 : 1;
  321. unsigned int intr7 : 1;
  322. unsigned int i2c0_done : 1;
  323. unsigned int i2c1_done : 1;
  324. unsigned int dummy1 : 22;
  325. } reg_gio_rw_ack_intr;
  326. #define REG_RD_ADDR_gio_rw_ack_intr 132
  327. #define REG_WR_ADDR_gio_rw_ack_intr 132
  328. /* Register r_intr, scope gio, type r */
  329. typedef struct {
  330. unsigned int intr0 : 1;
  331. unsigned int intr1 : 1;
  332. unsigned int intr2 : 1;
  333. unsigned int intr3 : 1;
  334. unsigned int intr4 : 1;
  335. unsigned int intr5 : 1;
  336. unsigned int intr6 : 1;
  337. unsigned int intr7 : 1;
  338. unsigned int i2c0_done : 1;
  339. unsigned int i2c1_done : 1;
  340. unsigned int dummy1 : 22;
  341. } reg_gio_r_intr;
  342. #define REG_RD_ADDR_gio_r_intr 136
  343. /* Register r_masked_intr, scope gio, type r */
  344. typedef struct {
  345. unsigned int intr0 : 1;
  346. unsigned int intr1 : 1;
  347. unsigned int intr2 : 1;
  348. unsigned int intr3 : 1;
  349. unsigned int intr4 : 1;
  350. unsigned int intr5 : 1;
  351. unsigned int intr6 : 1;
  352. unsigned int intr7 : 1;
  353. unsigned int i2c0_done : 1;
  354. unsigned int i2c1_done : 1;
  355. unsigned int dummy1 : 22;
  356. } reg_gio_r_masked_intr;
  357. #define REG_RD_ADDR_gio_r_masked_intr 140
  358. /* Register rw_i2c0_start, scope gio, type rw */
  359. typedef struct {
  360. unsigned int run : 1;
  361. unsigned int dummy1 : 31;
  362. } reg_gio_rw_i2c0_start;
  363. #define REG_RD_ADDR_gio_rw_i2c0_start 144
  364. #define REG_WR_ADDR_gio_rw_i2c0_start 144
  365. /* Register rw_i2c0_cfg, scope gio, type rw */
  366. typedef struct {
  367. unsigned int en : 1;
  368. unsigned int bit_order : 1;
  369. unsigned int scl_io : 1;
  370. unsigned int scl_inv : 1;
  371. unsigned int sda_io : 1;
  372. unsigned int sda_idle : 1;
  373. unsigned int dummy1 : 26;
  374. } reg_gio_rw_i2c0_cfg;
  375. #define REG_RD_ADDR_gio_rw_i2c0_cfg 148
  376. #define REG_WR_ADDR_gio_rw_i2c0_cfg 148
  377. /* Register rw_i2c0_ctrl, scope gio, type rw */
  378. typedef struct {
  379. unsigned int trf_bits : 6;
  380. unsigned int switch_dir : 6;
  381. unsigned int extra_start : 3;
  382. unsigned int early_end : 1;
  383. unsigned int start_stop : 1;
  384. unsigned int ack_dir0 : 1;
  385. unsigned int ack_dir1 : 1;
  386. unsigned int ack_dir2 : 1;
  387. unsigned int ack_dir3 : 1;
  388. unsigned int ack_dir4 : 1;
  389. unsigned int ack_dir5 : 1;
  390. unsigned int ack_bit : 1;
  391. unsigned int start_bit : 1;
  392. unsigned int freq : 2;
  393. unsigned int dummy1 : 5;
  394. } reg_gio_rw_i2c0_ctrl;
  395. #define REG_RD_ADDR_gio_rw_i2c0_ctrl 152
  396. #define REG_WR_ADDR_gio_rw_i2c0_ctrl 152
  397. /* Register rw_i2c0_data, scope gio, type rw */
  398. typedef struct {
  399. unsigned int data0 : 8;
  400. unsigned int data1 : 8;
  401. unsigned int data2 : 8;
  402. unsigned int data3 : 8;
  403. } reg_gio_rw_i2c0_data;
  404. #define REG_RD_ADDR_gio_rw_i2c0_data 156
  405. #define REG_WR_ADDR_gio_rw_i2c0_data 156
  406. /* Register rw_i2c0_data2, scope gio, type rw */
  407. typedef struct {
  408. unsigned int data4 : 8;
  409. unsigned int data5 : 8;
  410. unsigned int start_val : 6;
  411. unsigned int ack_val : 6;
  412. unsigned int dummy1 : 4;
  413. } reg_gio_rw_i2c0_data2;
  414. #define REG_RD_ADDR_gio_rw_i2c0_data2 160
  415. #define REG_WR_ADDR_gio_rw_i2c0_data2 160
  416. /* Register rw_i2c1_start, scope gio, type rw */
  417. typedef struct {
  418. unsigned int run : 1;
  419. unsigned int dummy1 : 31;
  420. } reg_gio_rw_i2c1_start;
  421. #define REG_RD_ADDR_gio_rw_i2c1_start 164
  422. #define REG_WR_ADDR_gio_rw_i2c1_start 164
  423. /* Register rw_i2c1_cfg, scope gio, type rw */
  424. typedef struct {
  425. unsigned int en : 1;
  426. unsigned int bit_order : 1;
  427. unsigned int scl_io : 1;
  428. unsigned int scl_inv : 1;
  429. unsigned int sda0_io : 1;
  430. unsigned int sda0_idle : 1;
  431. unsigned int sda1_io : 1;
  432. unsigned int sda1_idle : 1;
  433. unsigned int sda2_io : 1;
  434. unsigned int sda2_idle : 1;
  435. unsigned int sda3_io : 1;
  436. unsigned int sda3_idle : 1;
  437. unsigned int sda_sel : 2;
  438. unsigned int sen_idle : 1;
  439. unsigned int sen_inv : 1;
  440. unsigned int sen_sel : 2;
  441. unsigned int dummy1 : 14;
  442. } reg_gio_rw_i2c1_cfg;
  443. #define REG_RD_ADDR_gio_rw_i2c1_cfg 168
  444. #define REG_WR_ADDR_gio_rw_i2c1_cfg 168
  445. /* Register rw_i2c1_ctrl, scope gio, type rw */
  446. typedef struct {
  447. unsigned int trf_bits : 6;
  448. unsigned int switch_dir : 6;
  449. unsigned int extra_start : 3;
  450. unsigned int early_end : 1;
  451. unsigned int start_stop : 1;
  452. unsigned int ack_dir0 : 1;
  453. unsigned int ack_dir1 : 1;
  454. unsigned int ack_dir2 : 1;
  455. unsigned int ack_dir3 : 1;
  456. unsigned int ack_dir4 : 1;
  457. unsigned int ack_dir5 : 1;
  458. unsigned int ack_bit : 1;
  459. unsigned int start_bit : 1;
  460. unsigned int freq : 2;
  461. unsigned int dummy1 : 5;
  462. } reg_gio_rw_i2c1_ctrl;
  463. #define REG_RD_ADDR_gio_rw_i2c1_ctrl 172
  464. #define REG_WR_ADDR_gio_rw_i2c1_ctrl 172
  465. /* Register rw_i2c1_data, scope gio, type rw */
  466. typedef struct {
  467. unsigned int data0 : 8;
  468. unsigned int data1 : 8;
  469. unsigned int data2 : 8;
  470. unsigned int data3 : 8;
  471. } reg_gio_rw_i2c1_data;
  472. #define REG_RD_ADDR_gio_rw_i2c1_data 176
  473. #define REG_WR_ADDR_gio_rw_i2c1_data 176
  474. /* Register rw_i2c1_data2, scope gio, type rw */
  475. typedef struct {
  476. unsigned int data4 : 8;
  477. unsigned int data5 : 8;
  478. unsigned int start_val : 6;
  479. unsigned int ack_val : 6;
  480. unsigned int dummy1 : 4;
  481. } reg_gio_rw_i2c1_data2;
  482. #define REG_RD_ADDR_gio_rw_i2c1_data2 180
  483. #define REG_WR_ADDR_gio_rw_i2c1_data2 180
  484. /* Register r_ppwm_stat, scope gio, type r */
  485. typedef struct {
  486. unsigned int freq : 2;
  487. unsigned int dummy1 : 30;
  488. } reg_gio_r_ppwm_stat;
  489. #define REG_RD_ADDR_gio_r_ppwm_stat 184
  490. /* Register rw_ppwm_data, scope gio, type rw */
  491. typedef struct {
  492. unsigned int data : 8;
  493. unsigned int dummy1 : 24;
  494. } reg_gio_rw_ppwm_data;
  495. #define REG_RD_ADDR_gio_rw_ppwm_data 188
  496. #define REG_WR_ADDR_gio_rw_ppwm_data 188
  497. /* Register rw_pwm0_ctrl, scope gio, type rw */
  498. typedef struct {
  499. unsigned int mode : 2;
  500. unsigned int ccd_override : 1;
  501. unsigned int ccd_val : 1;
  502. unsigned int dummy1 : 28;
  503. } reg_gio_rw_pwm0_ctrl;
  504. #define REG_RD_ADDR_gio_rw_pwm0_ctrl 192
  505. #define REG_WR_ADDR_gio_rw_pwm0_ctrl 192
  506. /* Register rw_pwm0_var, scope gio, type rw */
  507. typedef struct {
  508. unsigned int lo : 13;
  509. unsigned int hi : 13;
  510. unsigned int dummy1 : 6;
  511. } reg_gio_rw_pwm0_var;
  512. #define REG_RD_ADDR_gio_rw_pwm0_var 196
  513. #define REG_WR_ADDR_gio_rw_pwm0_var 196
  514. /* Register rw_pwm0_data, scope gio, type rw */
  515. typedef struct {
  516. unsigned int data : 8;
  517. unsigned int dummy1 : 24;
  518. } reg_gio_rw_pwm0_data;
  519. #define REG_RD_ADDR_gio_rw_pwm0_data 200
  520. #define REG_WR_ADDR_gio_rw_pwm0_data 200
  521. /* Register rw_pwm1_ctrl, scope gio, type rw */
  522. typedef struct {
  523. unsigned int mode : 2;
  524. unsigned int ccd_override : 1;
  525. unsigned int ccd_val : 1;
  526. unsigned int dummy1 : 28;
  527. } reg_gio_rw_pwm1_ctrl;
  528. #define REG_RD_ADDR_gio_rw_pwm1_ctrl 204
  529. #define REG_WR_ADDR_gio_rw_pwm1_ctrl 204
  530. /* Register rw_pwm1_var, scope gio, type rw */
  531. typedef struct {
  532. unsigned int lo : 13;
  533. unsigned int hi : 13;
  534. unsigned int dummy1 : 6;
  535. } reg_gio_rw_pwm1_var;
  536. #define REG_RD_ADDR_gio_rw_pwm1_var 208
  537. #define REG_WR_ADDR_gio_rw_pwm1_var 208
  538. /* Register rw_pwm1_data, scope gio, type rw */
  539. typedef struct {
  540. unsigned int data : 8;
  541. unsigned int dummy1 : 24;
  542. } reg_gio_rw_pwm1_data;
  543. #define REG_RD_ADDR_gio_rw_pwm1_data 212
  544. #define REG_WR_ADDR_gio_rw_pwm1_data 212
  545. /* Register rw_pwm2_ctrl, scope gio, type rw */
  546. typedef struct {
  547. unsigned int mode : 2;
  548. unsigned int ccd_override : 1;
  549. unsigned int ccd_val : 1;
  550. unsigned int dummy1 : 28;
  551. } reg_gio_rw_pwm2_ctrl;
  552. #define REG_RD_ADDR_gio_rw_pwm2_ctrl 216
  553. #define REG_WR_ADDR_gio_rw_pwm2_ctrl 216
  554. /* Register rw_pwm2_var, scope gio, type rw */
  555. typedef struct {
  556. unsigned int lo : 13;
  557. unsigned int hi : 13;
  558. unsigned int dummy1 : 6;
  559. } reg_gio_rw_pwm2_var;
  560. #define REG_RD_ADDR_gio_rw_pwm2_var 220
  561. #define REG_WR_ADDR_gio_rw_pwm2_var 220
  562. /* Register rw_pwm2_data, scope gio, type rw */
  563. typedef struct {
  564. unsigned int data : 8;
  565. unsigned int dummy1 : 24;
  566. } reg_gio_rw_pwm2_data;
  567. #define REG_RD_ADDR_gio_rw_pwm2_data 224
  568. #define REG_WR_ADDR_gio_rw_pwm2_data 224
  569. /* Register rw_pwm_in_cfg, scope gio, type rw */
  570. typedef struct {
  571. unsigned int pin : 3;
  572. unsigned int dummy1 : 29;
  573. } reg_gio_rw_pwm_in_cfg;
  574. #define REG_RD_ADDR_gio_rw_pwm_in_cfg 228
  575. #define REG_WR_ADDR_gio_rw_pwm_in_cfg 228
  576. /* Register r_pwm_in_lo, scope gio, type r */
  577. typedef struct {
  578. unsigned int data : 32;
  579. } reg_gio_r_pwm_in_lo;
  580. #define REG_RD_ADDR_gio_r_pwm_in_lo 232
  581. /* Register r_pwm_in_hi, scope gio, type r */
  582. typedef struct {
  583. unsigned int data : 32;
  584. } reg_gio_r_pwm_in_hi;
  585. #define REG_RD_ADDR_gio_r_pwm_in_hi 236
  586. /* Register r_pwm_in_cnt, scope gio, type r */
  587. typedef struct {
  588. unsigned int data : 32;
  589. } reg_gio_r_pwm_in_cnt;
  590. #define REG_RD_ADDR_gio_r_pwm_in_cnt 240
  591. /* Constants */
  592. enum {
  593. regk_gio_anyedge = 0x00000007,
  594. regk_gio_f100k = 0x00000000,
  595. regk_gio_f1562 = 0x00000000,
  596. regk_gio_f195 = 0x00000003,
  597. regk_gio_f1m = 0x00000002,
  598. regk_gio_f390 = 0x00000002,
  599. regk_gio_f400k = 0x00000001,
  600. regk_gio_f5m = 0x00000003,
  601. regk_gio_f781 = 0x00000001,
  602. regk_gio_hi = 0x00000001,
  603. regk_gio_in = 0x00000000,
  604. regk_gio_intr_pa0 = 0x00000000,
  605. regk_gio_intr_pa1 = 0x00000000,
  606. regk_gio_intr_pa10 = 0x00000001,
  607. regk_gio_intr_pa11 = 0x00000001,
  608. regk_gio_intr_pa12 = 0x00000001,
  609. regk_gio_intr_pa13 = 0x00000001,
  610. regk_gio_intr_pa14 = 0x00000001,
  611. regk_gio_intr_pa15 = 0x00000001,
  612. regk_gio_intr_pa16 = 0x00000002,
  613. regk_gio_intr_pa17 = 0x00000002,
  614. regk_gio_intr_pa18 = 0x00000002,
  615. regk_gio_intr_pa19 = 0x00000002,
  616. regk_gio_intr_pa2 = 0x00000000,
  617. regk_gio_intr_pa20 = 0x00000002,
  618. regk_gio_intr_pa21 = 0x00000002,
  619. regk_gio_intr_pa22 = 0x00000002,
  620. regk_gio_intr_pa23 = 0x00000002,
  621. regk_gio_intr_pa24 = 0x00000003,
  622. regk_gio_intr_pa25 = 0x00000003,
  623. regk_gio_intr_pa26 = 0x00000003,
  624. regk_gio_intr_pa27 = 0x00000003,
  625. regk_gio_intr_pa28 = 0x00000003,
  626. regk_gio_intr_pa29 = 0x00000003,
  627. regk_gio_intr_pa3 = 0x00000000,
  628. regk_gio_intr_pa30 = 0x00000003,
  629. regk_gio_intr_pa31 = 0x00000003,
  630. regk_gio_intr_pa4 = 0x00000000,
  631. regk_gio_intr_pa5 = 0x00000000,
  632. regk_gio_intr_pa6 = 0x00000000,
  633. regk_gio_intr_pa7 = 0x00000000,
  634. regk_gio_intr_pa8 = 0x00000001,
  635. regk_gio_intr_pa9 = 0x00000001,
  636. regk_gio_intr_pb0 = 0x00000004,
  637. regk_gio_intr_pb1 = 0x00000004,
  638. regk_gio_intr_pb10 = 0x00000005,
  639. regk_gio_intr_pb11 = 0x00000005,
  640. regk_gio_intr_pb12 = 0x00000005,
  641. regk_gio_intr_pb13 = 0x00000005,
  642. regk_gio_intr_pb14 = 0x00000005,
  643. regk_gio_intr_pb15 = 0x00000005,
  644. regk_gio_intr_pb16 = 0x00000006,
  645. regk_gio_intr_pb17 = 0x00000006,
  646. regk_gio_intr_pb18 = 0x00000006,
  647. regk_gio_intr_pb19 = 0x00000006,
  648. regk_gio_intr_pb2 = 0x00000004,
  649. regk_gio_intr_pb20 = 0x00000006,
  650. regk_gio_intr_pb21 = 0x00000006,
  651. regk_gio_intr_pb22 = 0x00000006,
  652. regk_gio_intr_pb23 = 0x00000006,
  653. regk_gio_intr_pb24 = 0x00000007,
  654. regk_gio_intr_pb25 = 0x00000007,
  655. regk_gio_intr_pb26 = 0x00000007,
  656. regk_gio_intr_pb27 = 0x00000007,
  657. regk_gio_intr_pb28 = 0x00000007,
  658. regk_gio_intr_pb29 = 0x00000007,
  659. regk_gio_intr_pb3 = 0x00000004,
  660. regk_gio_intr_pb30 = 0x00000007,
  661. regk_gio_intr_pb31 = 0x00000007,
  662. regk_gio_intr_pb4 = 0x00000004,
  663. regk_gio_intr_pb5 = 0x00000004,
  664. regk_gio_intr_pb6 = 0x00000004,
  665. regk_gio_intr_pb7 = 0x00000004,
  666. regk_gio_intr_pb8 = 0x00000005,
  667. regk_gio_intr_pb9 = 0x00000005,
  668. regk_gio_intr_pc0 = 0x00000008,
  669. regk_gio_intr_pc1 = 0x00000008,
  670. regk_gio_intr_pc10 = 0x00000009,
  671. regk_gio_intr_pc11 = 0x00000009,
  672. regk_gio_intr_pc12 = 0x00000009,
  673. regk_gio_intr_pc13 = 0x00000009,
  674. regk_gio_intr_pc14 = 0x00000009,
  675. regk_gio_intr_pc15 = 0x00000009,
  676. regk_gio_intr_pc2 = 0x00000008,
  677. regk_gio_intr_pc3 = 0x00000008,
  678. regk_gio_intr_pc4 = 0x00000008,
  679. regk_gio_intr_pc5 = 0x00000008,
  680. regk_gio_intr_pc6 = 0x00000008,
  681. regk_gio_intr_pc7 = 0x00000008,
  682. regk_gio_intr_pc8 = 0x00000009,
  683. regk_gio_intr_pc9 = 0x00000009,
  684. regk_gio_intr_pd0 = 0x0000000c,
  685. regk_gio_intr_pd1 = 0x0000000c,
  686. regk_gio_intr_pd10 = 0x0000000d,
  687. regk_gio_intr_pd11 = 0x0000000d,
  688. regk_gio_intr_pd12 = 0x0000000d,
  689. regk_gio_intr_pd13 = 0x0000000d,
  690. regk_gio_intr_pd14 = 0x0000000d,
  691. regk_gio_intr_pd15 = 0x0000000d,
  692. regk_gio_intr_pd16 = 0x0000000e,
  693. regk_gio_intr_pd17 = 0x0000000e,
  694. regk_gio_intr_pd18 = 0x0000000e,
  695. regk_gio_intr_pd19 = 0x0000000e,
  696. regk_gio_intr_pd2 = 0x0000000c,
  697. regk_gio_intr_pd20 = 0x0000000e,
  698. regk_gio_intr_pd21 = 0x0000000e,
  699. regk_gio_intr_pd22 = 0x0000000e,
  700. regk_gio_intr_pd23 = 0x0000000e,
  701. regk_gio_intr_pd24 = 0x0000000f,
  702. regk_gio_intr_pd25 = 0x0000000f,
  703. regk_gio_intr_pd26 = 0x0000000f,
  704. regk_gio_intr_pd27 = 0x0000000f,
  705. regk_gio_intr_pd28 = 0x0000000f,
  706. regk_gio_intr_pd29 = 0x0000000f,
  707. regk_gio_intr_pd3 = 0x0000000c,
  708. regk_gio_intr_pd30 = 0x0000000f,
  709. regk_gio_intr_pd31 = 0x0000000f,
  710. regk_gio_intr_pd4 = 0x0000000c,
  711. regk_gio_intr_pd5 = 0x0000000c,
  712. regk_gio_intr_pd6 = 0x0000000c,
  713. regk_gio_intr_pd7 = 0x0000000c,
  714. regk_gio_intr_pd8 = 0x0000000d,
  715. regk_gio_intr_pd9 = 0x0000000d,
  716. regk_gio_lo = 0x00000002,
  717. regk_gio_lsb = 0x00000000,
  718. regk_gio_msb = 0x00000001,
  719. regk_gio_negedge = 0x00000006,
  720. regk_gio_no = 0x00000000,
  721. regk_gio_no_switch = 0x0000003f,
  722. regk_gio_none = 0x00000007,
  723. regk_gio_off = 0x00000000,
  724. regk_gio_opendrain = 0x00000000,
  725. regk_gio_out = 0x00000001,
  726. regk_gio_posedge = 0x00000005,
  727. regk_gio_pwm_hfp = 0x00000002,
  728. regk_gio_pwm_pa0 = 0x00000001,
  729. regk_gio_pwm_pa19 = 0x00000004,
  730. regk_gio_pwm_pa6 = 0x00000002,
  731. regk_gio_pwm_pa7 = 0x00000003,
  732. regk_gio_pwm_pb26 = 0x00000005,
  733. regk_gio_pwm_pd23 = 0x00000006,
  734. regk_gio_pwm_pd31 = 0x00000007,
  735. regk_gio_pwm_std = 0x00000001,
  736. regk_gio_pwm_var = 0x00000003,
  737. regk_gio_rw_i2c0_cfg_default = 0x00000020,
  738. regk_gio_rw_i2c0_ctrl_default = 0x00010000,
  739. regk_gio_rw_i2c0_start_default = 0x00000000,
  740. regk_gio_rw_i2c1_cfg_default = 0x00000aa0,
  741. regk_gio_rw_i2c1_ctrl_default = 0x00010000,
  742. regk_gio_rw_i2c1_start_default = 0x00000000,
  743. regk_gio_rw_intr_cfg_default = 0x00000000,
  744. regk_gio_rw_intr_mask_default = 0x00000000,
  745. regk_gio_rw_pa_oe_default = 0x00000000,
  746. regk_gio_rw_pb_oe_default = 0x00000000,
  747. regk_gio_rw_pc_oe_default = 0x00000000,
  748. regk_gio_rw_ppwm_data_default = 0x00000000,
  749. regk_gio_rw_pwm0_ctrl_default = 0x00000000,
  750. regk_gio_rw_pwm1_ctrl_default = 0x00000000,
  751. regk_gio_rw_pwm2_ctrl_default = 0x00000000,
  752. regk_gio_rw_pwm_in_cfg_default = 0x00000000,
  753. regk_gio_sda0 = 0x00000000,
  754. regk_gio_sda1 = 0x00000001,
  755. regk_gio_sda2 = 0x00000002,
  756. regk_gio_sda3 = 0x00000003,
  757. regk_gio_sen = 0x00000000,
  758. regk_gio_set = 0x00000003,
  759. regk_gio_yes = 0x00000001
  760. };
  761. #endif /* __gio_defs_h */