dmc.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. #ifdef DDR_DMC
  2. #else
  3. #define DDR_DMC
  4. #define MMC_DDR_CTRL 0x1000
  5. #define MMC_REQ_CTRL 0x1004
  6. #define MMC_ARB_CTRL 0x1008
  7. #define MMC_ARB_CTRL1 0x100c
  8. #define MMC_QOS0_CTRL 0x1010
  9. //bit 31 qos enable.
  10. //bit 26 1 : danamic change the bandwidth percentage. 0 : fixed bandwidth. all 64.
  11. //bit 25 grant mode. 1 grant clock cycles. 0 grant data cycles.
  12. //bit 24 leakybucket counter goes to 0. When no req or no other request.
  13. //bit 21:16 bankwidth requirement. unit 1/64.
  14. //bit 15:0. after stop the re_enable threadhold.
  15. #define MMC_QOS0_MAX 0x1014
  16. #define MMC_QOS0_MIN 0x1018
  17. #define MMC_QOS0_LIMIT 0x101c
  18. #define MMC_QOS0_STOP 0x1020
  19. #define MMC_QOS1_CTRL 0x1024
  20. #define MMC_QOS1_MAX 0x1028
  21. #define MMC_QOS1_MIN 0x102c
  22. #define MMC_QOS1_STOP 0x1030
  23. #define MMC_QOS1_LIMIT 0x1034
  24. #define MMC_QOS2_CTRL 0x1038
  25. #define MMC_QOS2_MAX 0x103c
  26. #define MMC_QOS2_MIN 0x1040
  27. #define MMC_QOS2_STOP 0x1044
  28. #define MMC_QOS2_LIMIT 0x1048
  29. #define MMC_QOS3_CTRL 0x104c
  30. #define MMC_QOS3_MAX 0x1050
  31. #define MMC_QOS3_MIN 0x1054
  32. #define MMC_QOS3_STOP 0x1058
  33. #define MMC_QOS3_LIMIT 0x105c
  34. #define MMC_QOS4_CTRL 0x1060
  35. #define MMC_QOS4_MAX 0x1064
  36. #define MMC_QOS4_MIN 0x1068
  37. #define MMC_QOS4_STOP 0x106c
  38. #define MMC_QOS4_LIMIT 0x1070
  39. #define MMC_QOS5_CTRL 0x1074
  40. #define MMC_QOS5_MAX 0x1078
  41. #define MMC_QOS5_MIN 0x107c
  42. #define MMC_QOS5_STOP 0x1080
  43. #define MMC_QOS5_LIMIT 0x1084
  44. #define MMC_QOS6_CTRL 0x1088
  45. #define MMC_QOS6_MAX 0x108c
  46. #define MMC_QOS6_MIN 0x1090
  47. #define MMC_QOS6_STOP 0x1094
  48. #define MMC_QOS6_LIMIT 0x1098
  49. #define MMC_QOS7_CTRL 0x109c
  50. #define MMC_QOS7_MAX 0x10a0
  51. #define MMC_QOS7_MIN 0x10a4
  52. #define MMC_QOS7_STOP 0x10a8
  53. #define MMC_QOS7_LIMIT 0x10ac
  54. #define MMC_QOSMON_CTRL 0x10b0
  55. #define MMC_QOSMON_TIM 0x10b4
  56. #define MMC_QOSMON_MST 0x10b8
  57. #define MMC_MON_CLKCNT 0x10bc
  58. #define MMC_ALL_REQCNT 0x10c0
  59. #define MMC_ALL_GANTCNT 0x10c4
  60. #define MMC_ONE_REQCNT 0x10c8
  61. #define MMC_ONE_CYCLE_CNT 0x10cc
  62. #define MMC_ONE_DATA_CNT 0x10d0
  63. #define DC_CAV_CTRL 0x1300
  64. #define DC_CAV_LVL3_GRANT 0x1304
  65. #define DC_CAV_LVL3_GH 0x1308
  66. // this is a 32 bit grant regsiter.
  67. // each bit grant a thread ID for LVL3 use.
  68. #define DC_CAV_LVL3_FLIP 0x130c
  69. #define DC_CAV_LVL3_FH 0x1310
  70. // this is a 32 bit FLIP regsiter.
  71. // each bit to define a thread ID for LVL3 use.
  72. #define DC_CAV_LVL3_CTRL0 0x1314
  73. #define DC_CAV_LVL3_CTRL1 0x1318
  74. #define DC_CAV_LVL3_CTRL2 0x131c
  75. #define DC_CAV_LVL3_CTRL3 0x1320
  76. #define DC_CAV_LUT_DATAL 0x1324
  77. #define CANVAS_ADDR_LMASK 0x1fffffff
  78. #define CANVAS_WIDTH_LMASK 0x7
  79. #define CANVAS_WIDTH_LWID 3
  80. #define CANVAS_WIDTH_LBIT 29
  81. #define DC_CAV_LUT_DATAH 0x1328
  82. #define CANVAS_WIDTH_HMASK 0x1ff
  83. #define CANVAS_WIDTH_HBIT 0
  84. #define CANVAS_HEIGHT_MASK 0x1fff
  85. #define CANVAS_HEIGHT_BIT 9
  86. #define CANVAS_YWRAP (1<<23)
  87. #define CANVAS_XWRAP (1<<22)
  88. #define CANVAS_ADDR_NOWRAP 0x00
  89. #define CANVAS_ADDR_WRAPX 0x01
  90. #define CANVAS_ADDR_WRAPY 0x02
  91. #define CANVAS_BLKMODE_MASK 3
  92. #define CANVAS_BLKMODE_BIT 24
  93. #define CANVAS_BLKMODE_LINEAR 0x00
  94. #define CANVAS_BLKMODE_32X32 0x01
  95. #define CANVAS_BLKMODE_64X32 0x02
  96. #define DC_CAV_LUT_ADDR 0x132c
  97. #define CANVAS_LUT_INDEX_BIT 0
  98. #define CANVAS_LUT_INDEX_MASK 0x7
  99. #define CANVAS_LUT_WR_EN (0x2 << 8)
  100. #define CANVAS_LUT_RD_EN (0x1 << 8)
  101. #define DC_CAV_LVL3_MODE 0x1330
  102. #define MMC_PROT_ADDR 0x1334
  103. #define MMC_PROT_SELH 0x1338
  104. #define MMC_PROT_SELL 0x133c
  105. #define MMC_PROT_CTL_STS 0x1340
  106. #define MMC_INT_STS 0x1344
  107. #define MMC_PHY_CTRL 0x1380
  108. #define MMC_APB3_CTRL 0x1384
  109. #define MMC_REQ0_CTRL 0x1388
  110. // bit 31, request in enable.
  111. // 30:24: cmd fifo counter when request generate to dmc arbitor if there's no lbrst.
  112. // 23:16: waiting time when request generate to dmc arbitor if there's o lbrst.
  113. // 15:8: how many write rsp can hold in the whole dmc pipe lines.
  114. // 7:0: how many read data can hold in the whole dmc pipe lines.
  115. #define MMC_REQ1_CTRL 0x138c
  116. #define MMC_REQ2_CTRL 0x1390
  117. #define MMC_REQ3_CTRL 0x1394
  118. #define MMC_REQ4_CTRL 0x1398
  119. #define MMC_REQ5_CTRL 0x139c
  120. #define MMC_REQ6_CTRL 0x13a0
  121. #define MMC_REQ7_CTRL 0x13a4
  122. #endif