irq_nmi_defs.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #ifndef __irq_nmi_defs_h
  2. #define __irq_nmi_defs_h
  3. /*
  4. * This file is autogenerated from
  5. * file: ../../mod/irq_nmi.r
  6. * id: <not found>
  7. * last modfied: Thu Jan 22 09:22:43 2004
  8. *
  9. * by /n/asic/design/tools/rdesc/src/rdes2c --outfile irq_nmi_defs.h ../../mod/irq_nmi.r
  10. * id: $Id: irq_nmi_defs.h,v 1.1 2005/04/24 18:30:58 starvik Exp $
  11. * Any changes here will be lost.
  12. *
  13. * -*- buffer-read-only: t -*-
  14. */
  15. /* Main access macros */
  16. #ifndef REG_RD
  17. #define REG_RD( scope, inst, reg ) \
  18. REG_READ( reg_##scope##_##reg, \
  19. (inst) + REG_RD_ADDR_##scope##_##reg )
  20. #endif
  21. #ifndef REG_WR
  22. #define REG_WR( scope, inst, reg, val ) \
  23. REG_WRITE( reg_##scope##_##reg, \
  24. (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
  25. #endif
  26. #ifndef REG_RD_VECT
  27. #define REG_RD_VECT( scope, inst, reg, index ) \
  28. REG_READ( reg_##scope##_##reg, \
  29. (inst) + REG_RD_ADDR_##scope##_##reg + \
  30. (index) * STRIDE_##scope##_##reg )
  31. #endif
  32. #ifndef REG_WR_VECT
  33. #define REG_WR_VECT( scope, inst, reg, index, val ) \
  34. REG_WRITE( reg_##scope##_##reg, \
  35. (inst) + REG_WR_ADDR_##scope##_##reg + \
  36. (index) * STRIDE_##scope##_##reg, (val) )
  37. #endif
  38. #ifndef REG_RD_INT
  39. #define REG_RD_INT( scope, inst, reg ) \
  40. REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
  41. #endif
  42. #ifndef REG_WR_INT
  43. #define REG_WR_INT( scope, inst, reg, val ) \
  44. REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
  45. #endif
  46. #ifndef REG_RD_INT_VECT
  47. #define REG_RD_INT_VECT( scope, inst, reg, index ) \
  48. REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
  49. (index) * STRIDE_##scope##_##reg )
  50. #endif
  51. #ifndef REG_WR_INT_VECT
  52. #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
  53. REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
  54. (index) * STRIDE_##scope##_##reg, (val) )
  55. #endif
  56. #ifndef REG_TYPE_CONV
  57. #define REG_TYPE_CONV( type, orgtype, val ) \
  58. ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
  59. #endif
  60. #ifndef reg_page_size
  61. #define reg_page_size 8192
  62. #endif
  63. #ifndef REG_ADDR
  64. #define REG_ADDR( scope, inst, reg ) \
  65. ( (inst) + REG_RD_ADDR_##scope##_##reg )
  66. #endif
  67. #ifndef REG_ADDR_VECT
  68. #define REG_ADDR_VECT( scope, inst, reg, index ) \
  69. ( (inst) + REG_RD_ADDR_##scope##_##reg + \
  70. (index) * STRIDE_##scope##_##reg )
  71. #endif
  72. /* C-code for register scope irq_nmi */
  73. /* Register rw_cmd, scope irq_nmi, type rw */
  74. typedef struct {
  75. unsigned int delay : 16;
  76. unsigned int op : 2;
  77. unsigned int dummy1 : 14;
  78. } reg_irq_nmi_rw_cmd;
  79. #define REG_RD_ADDR_irq_nmi_rw_cmd 0
  80. #define REG_WR_ADDR_irq_nmi_rw_cmd 0
  81. /* Constants */
  82. enum {
  83. regk_irq_nmi_ack_irq = 0x00000002,
  84. regk_irq_nmi_ack_nmi = 0x00000003,
  85. regk_irq_nmi_irq = 0x00000000,
  86. regk_irq_nmi_nmi = 0x00000001
  87. };
  88. #endif /* __irq_nmi_defs_h */