debug_host.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _DEBUG_HOST_H_
  13. #define _DEBUG_HOST_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_DEBUG_HOST_BASE (0x5140f000)
  17. typedef volatile struct
  18. {
  19. uint32_t cmd; // 0x00000000
  20. uint32_t data; // 0x00000004
  21. uint32_t event; // 0x00000008
  22. uint32_t mode; // 0x0000000c
  23. uint32_t h2p_status; // 0x00000010
  24. uint32_t p2h_status; // 0x00000014
  25. uint32_t irq; // 0x00000018
  26. } HWP_DEBUG_HOST_T;
  27. #define hwp_debugHost ((HWP_DEBUG_HOST_T *)REG_ACCESS_ADDRESS(REG_DEBUG_HOST_BASE))
  28. // cmd
  29. typedef union {
  30. uint32_t v;
  31. struct
  32. {
  33. uint32_t addr : 29; // [28:0], read only
  34. uint32_t size : 2; // [30:29], read only
  35. uint32_t write_h : 1; // [31], read only
  36. } b;
  37. } REG_DEBUG_HOST_CMD_T;
  38. // event
  39. typedef union {
  40. uint32_t v;
  41. struct
  42. {
  43. uint32_t event0_sema : 1; // [0]
  44. uint32_t event31_1 : 31; // [31:1]
  45. } b;
  46. } REG_DEBUG_HOST_EVENT_T;
  47. // mode
  48. typedef union {
  49. uint32_t v;
  50. struct
  51. {
  52. uint32_t force_on : 1; // [0]
  53. uint32_t clk_host_on : 1; // [1], read only
  54. uint32_t __31_2 : 30; // [31:2]
  55. } b;
  56. } REG_DEBUG_HOST_MODE_T;
  57. // h2p_status
  58. typedef union {
  59. uint32_t v;
  60. struct
  61. {
  62. uint32_t h2p_status : 8; // [7:0], read only
  63. uint32_t __15_8 : 8; // [15:8]
  64. uint32_t h2p_status_rst : 1; // [16]
  65. uint32_t __31_17 : 15; // [31:17]
  66. } b;
  67. } REG_DEBUG_HOST_H2P_STATUS_T;
  68. // p2h_status
  69. typedef union {
  70. uint32_t v;
  71. struct
  72. {
  73. uint32_t p2h_status : 8; // [7:0]
  74. uint32_t __31_8 : 24; // [31:8]
  75. } b;
  76. } REG_DEBUG_HOST_P2H_STATUS_T;
  77. // irq
  78. typedef union {
  79. uint32_t v;
  80. struct
  81. {
  82. uint32_t xcpu_irq : 1; // [0], read only
  83. uint32_t bcpu_irq : 1; // [1], read only
  84. uint32_t __31_2 : 30; // [31:2]
  85. } b;
  86. } REG_DEBUG_HOST_IRQ_T;
  87. // cmd
  88. #define DEBUG_HOST_ADDR(n) (((n)&0x1fffffff) << 0)
  89. #define DEBUG_HOST_SIZE(n) (((n)&0x3) << 29)
  90. #define DEBUG_HOST_WRITE_H (1 << 31)
  91. // event
  92. #define DEBUG_HOST_EVENT0_SEMA (1 << 0)
  93. #define DEBUG_HOST_EVENT31_1(n) (((n)&0x7fffffff) << 1)
  94. // mode
  95. #define DEBUG_HOST_FORCE_ON (1 << 0)
  96. #define DEBUG_HOST_CLK_HOST_ON (1 << 1)
  97. // h2p_status
  98. #define DEBUG_HOST_H2P_STATUS(n) (((n)&0xff) << 0)
  99. #define DEBUG_HOST_H2P_STATUS_RST (1 << 16)
  100. // p2h_status
  101. #define DEBUG_HOST_P2H_STATUS(n) (((n)&0xff) << 0)
  102. // irq
  103. #define DEBUG_HOST_XCPU_IRQ (1 << 0)
  104. #define DEBUG_HOST_BCPU_IRQ (1 << 1)
  105. #endif // _DEBUG_HOST_H_