strmux_defs.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. #ifndef __strmux_defs_h
  2. #define __strmux_defs_h
  3. /*
  4. * This file is autogenerated from
  5. * file: strmux.r
  6. *
  7. * by ../../../tools/rdesc/bin/rdes2c -outfile strmux_defs.h strmux.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 strmux */
  70. /* Register rw_cfg, scope strmux, type rw */
  71. typedef struct {
  72. unsigned int dma0 : 2;
  73. unsigned int dma1 : 2;
  74. unsigned int dma2 : 2;
  75. unsigned int dma3 : 2;
  76. unsigned int dma4 : 2;
  77. unsigned int dma5 : 2;
  78. unsigned int dma6 : 2;
  79. unsigned int dma7 : 2;
  80. unsigned int dummy1 : 2;
  81. unsigned int dma9 : 2;
  82. unsigned int dummy2 : 2;
  83. unsigned int dma11 : 2;
  84. unsigned int dummy3 : 8;
  85. } reg_strmux_rw_cfg;
  86. #define REG_RD_ADDR_strmux_rw_cfg 0
  87. #define REG_WR_ADDR_strmux_rw_cfg 0
  88. /* Constants */
  89. enum {
  90. regk_strmux_eth = 0x00000001,
  91. regk_strmux_h264 = 0x00000001,
  92. regk_strmux_iop = 0x00000001,
  93. regk_strmux_jpeg = 0x00000001,
  94. regk_strmux_off = 0x00000000,
  95. regk_strmux_rw_cfg_default = 0x00000000,
  96. regk_strmux_ser0 = 0x00000002,
  97. regk_strmux_ser1 = 0x00000002,
  98. regk_strmux_ser2 = 0x00000002,
  99. regk_strmux_ser3 = 0x00000002,
  100. regk_strmux_ser4 = 0x00000002,
  101. regk_strmux_sser = 0x00000001,
  102. regk_strmux_strcop = 0x00000001
  103. };
  104. #endif /* __strmux_defs_h */