config_defs_asm.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. #ifndef __config_defs_asm_h
  2. #define __config_defs_asm_h
  3. /*
  4. * This file is autogenerated from
  5. * file: ../../rtl/config_regs.r
  6. * id: config_regs.r,v 1.23 2004/03/04 11:34:42 mikaeln Exp
  7. * last modfied: Thu Mar 4 12:34:39 2004
  8. *
  9. * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/config_defs_asm.h ../../rtl/config_regs.r
  10. * id: $Id: config_defs_asm.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
  11. * Any changes here will be lost.
  12. *
  13. * -*- buffer-read-only: t -*-
  14. */
  15. #ifndef REG_FIELD
  16. #define REG_FIELD( scope, reg, field, value ) \
  17. REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
  18. #define REG_FIELD_X_( value, shift ) ((value) << shift)
  19. #endif
  20. #ifndef REG_STATE
  21. #define REG_STATE( scope, reg, field, symbolic_value ) \
  22. REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
  23. #define REG_STATE_X_( k, shift ) (k << shift)
  24. #endif
  25. #ifndef REG_MASK
  26. #define REG_MASK( scope, reg, field ) \
  27. REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
  28. #define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
  29. #endif
  30. #ifndef REG_LSB
  31. #define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
  32. #endif
  33. #ifndef REG_BIT
  34. #define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
  35. #endif
  36. #ifndef REG_ADDR
  37. #define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
  38. #define REG_ADDR_X_( inst, offs ) ((inst) + offs)
  39. #endif
  40. #ifndef REG_ADDR_VECT
  41. #define REG_ADDR_VECT( scope, inst, reg, index ) \
  42. REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
  43. STRIDE_##scope##_##reg )
  44. #define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
  45. ((inst) + offs + (index) * stride)
  46. #endif
  47. /* Register r_bootsel, scope config, type r */
  48. #define reg_config_r_bootsel___boot_mode___lsb 0
  49. #define reg_config_r_bootsel___boot_mode___width 3
  50. #define reg_config_r_bootsel___full_duplex___lsb 3
  51. #define reg_config_r_bootsel___full_duplex___width 1
  52. #define reg_config_r_bootsel___full_duplex___bit 3
  53. #define reg_config_r_bootsel___user___lsb 4
  54. #define reg_config_r_bootsel___user___width 1
  55. #define reg_config_r_bootsel___user___bit 4
  56. #define reg_config_r_bootsel___pll___lsb 5
  57. #define reg_config_r_bootsel___pll___width 1
  58. #define reg_config_r_bootsel___pll___bit 5
  59. #define reg_config_r_bootsel___flash_bw___lsb 6
  60. #define reg_config_r_bootsel___flash_bw___width 1
  61. #define reg_config_r_bootsel___flash_bw___bit 6
  62. #define reg_config_r_bootsel_offset 0
  63. /* Register rw_clk_ctrl, scope config, type rw */
  64. #define reg_config_rw_clk_ctrl___pll___lsb 0
  65. #define reg_config_rw_clk_ctrl___pll___width 1
  66. #define reg_config_rw_clk_ctrl___pll___bit 0
  67. #define reg_config_rw_clk_ctrl___cpu___lsb 1
  68. #define reg_config_rw_clk_ctrl___cpu___width 1
  69. #define reg_config_rw_clk_ctrl___cpu___bit 1
  70. #define reg_config_rw_clk_ctrl___iop___lsb 2
  71. #define reg_config_rw_clk_ctrl___iop___width 1
  72. #define reg_config_rw_clk_ctrl___iop___bit 2
  73. #define reg_config_rw_clk_ctrl___dma01_eth0___lsb 3
  74. #define reg_config_rw_clk_ctrl___dma01_eth0___width 1
  75. #define reg_config_rw_clk_ctrl___dma01_eth0___bit 3
  76. #define reg_config_rw_clk_ctrl___dma23___lsb 4
  77. #define reg_config_rw_clk_ctrl___dma23___width 1
  78. #define reg_config_rw_clk_ctrl___dma23___bit 4
  79. #define reg_config_rw_clk_ctrl___dma45___lsb 5
  80. #define reg_config_rw_clk_ctrl___dma45___width 1
  81. #define reg_config_rw_clk_ctrl___dma45___bit 5
  82. #define reg_config_rw_clk_ctrl___dma67___lsb 6
  83. #define reg_config_rw_clk_ctrl___dma67___width 1
  84. #define reg_config_rw_clk_ctrl___dma67___bit 6
  85. #define reg_config_rw_clk_ctrl___dma89_strcop___lsb 7
  86. #define reg_config_rw_clk_ctrl___dma89_strcop___width 1
  87. #define reg_config_rw_clk_ctrl___dma89_strcop___bit 7
  88. #define reg_config_rw_clk_ctrl___bif___lsb 8
  89. #define reg_config_rw_clk_ctrl___bif___width 1
  90. #define reg_config_rw_clk_ctrl___bif___bit 8
  91. #define reg_config_rw_clk_ctrl___fix_io___lsb 9
  92. #define reg_config_rw_clk_ctrl___fix_io___width 1
  93. #define reg_config_rw_clk_ctrl___fix_io___bit 9
  94. #define reg_config_rw_clk_ctrl_offset 4
  95. /* Register rw_pad_ctrl, scope config, type rw */
  96. #define reg_config_rw_pad_ctrl___usb_susp___lsb 0
  97. #define reg_config_rw_pad_ctrl___usb_susp___width 1
  98. #define reg_config_rw_pad_ctrl___usb_susp___bit 0
  99. #define reg_config_rw_pad_ctrl___phyrst_n___lsb 1
  100. #define reg_config_rw_pad_ctrl___phyrst_n___width 1
  101. #define reg_config_rw_pad_ctrl___phyrst_n___bit 1
  102. #define reg_config_rw_pad_ctrl_offset 8
  103. /* Constants */
  104. #define regk_config_bw16 0x00000000
  105. #define regk_config_bw32 0x00000001
  106. #define regk_config_master 0x00000005
  107. #define regk_config_nand 0x00000003
  108. #define regk_config_net_rx 0x00000001
  109. #define regk_config_net_tx_rx 0x00000002
  110. #define regk_config_no 0x00000000
  111. #define regk_config_none 0x00000007
  112. #define regk_config_nor 0x00000000
  113. #define regk_config_rw_clk_ctrl_default 0x00000002
  114. #define regk_config_rw_pad_ctrl_default 0x00000000
  115. #define regk_config_ser 0x00000004
  116. #define regk_config_slave 0x00000006
  117. #define regk_config_yes 0x00000001
  118. #endif /* __config_defs_asm_h */