You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.2 KiB

8 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __SITARA_AM437x_CM_HEADER__
  2. #define __SITARA_AM437x_CM_HEADER__
  3. #include <stdint.h>
  4. #include <stdbool.h>
  5. #include <stdio.h>
  6. #include <fcntl.h>
  7. #include <unistd.h>
  8. #include <errno.h>
  9. #include <sys/mman.h>
  10. #include <sys/types.h>
  11. #include <sys/stat.h>
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. typedef struct{
  16. union{
  17. volatile uint32_t CTRL_REVISION;
  18. volatile struct {
  19. uint32_t IP_REV_MINOR : 6; // 5:0
  20. uint32_t IP_REV_CUSTOM: 2; // 7:6
  21. uint32_t IP_REV_MAJOR : 3; // 10:8
  22. uint32_t IP_REV_RTL: 5; // 15:11
  23. uint32_t IP_REV_FUNC : 12; // 27:16
  24. uint32_t : 2; // 29:28
  25. uint32_t IP_REV_SCHEME : 2; // 31:30
  26. } CTRL_REVISION_bit;
  27. }; // 0x00 - 0x03
  28. volatile uint32_t CTRL_HWINFO; // 0x04 - 0x07
  29. uint8_t rsvd1[8]; // 0xc08 - 0x0f
  30. union{
  31. volatile uint32_t CTRL_SYSCONFIG;
  32. volatile struct {
  33. uint32_t : 1; // 0:0
  34. uint32_t FREEEMU : 1; // 1:1
  35. uint32_t IDLEMODE: 2; // 3:2
  36. uint32_t STANDBY : 2; // 5:4
  37. uint32_t : 26; // 31:6
  38. } CTRL_SYSCONFIG_bit;
  39. }; // 0x10 - 0x13
  40. uint8_t rsvd2[44]; // 0xc14 - 0x3f
  41. union{
  42. volatile uint32_t CTRL_STS;
  43. volatile struct {
  44. uint32_t SYSBOOT0 : 8; // 7:0
  45. uint32_t DEVTYPE: 3; // 10:8
  46. uint32_t : 5; // 15:11
  47. uint32_t BW : 1; // 16:16
  48. uint32_t WAITEN: 1; // 17:17
  49. uint32_t ADMUX : 2; // 19:18
  50. uint32_t SYSBOOT13_12: 2; // 21:20
  51. uint32_t SYSBOOT15_14: 2; // 23:22
  52. uint32_t SYSBOOT16 : 1; // 24:24
  53. uint32_t SYSBOOT17 : 1; // 25:25
  54. uint32_t SYSBOOT18 : 1; // 26:26
  55. uint32_t : 5; // 31:27
  56. } CTRL_STS_bit;
  57. }; // 0x40 - 0x43
  58. uint8_t rsvd3[1568];//0x44 - 0x663
  59. union{
  60. volatile uint32_t CTRL_PWMSS;
  61. volatile struct {
  62. uint32_t PWMSS0_TBCLKEN : 1; // 0:0
  63. uint32_t PWMSS1_TBCLKEN : 1; // 1:1
  64. uint32_t PWMSS2_TBCLKEN : 1; // 2:2
  65. uint32_t PWM_SYNCSEL : 1; // 3:3
  66. uint32_t PWMSS3_TBCLKEN : 1; // 4:4
  67. uint32_t PWMSS4_TBCLKEN : 1; // 5:5
  68. uint32_t PWMSS5_TBCLKEN : 1; // 6:6
  69. uint32_t : 25; // 31:7
  70. } CTRL_PWMSS_bit;
  71. }; // 0x664 - 0x667
  72. } sysCM_REGS;
  73. #ifdef __cplusplus
  74. }
  75. #endif
  76. #endif