cpucfg.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Sunxi A31 CPUCFG register definition.
  4. *
  5. * (C) Copyright 2014 Hans de Goede <hdegoede@redhat.com
  6. */
  7. #ifndef _SUNXI_CPUCFG_H
  8. #define _SUNXI_CPUCFG_H
  9. #include <linux/compiler.h>
  10. #include <linux/types.h>
  11. #ifndef __ASSEMBLY__
  12. struct __packed sunxi_cpucfg_cpu {
  13. u32 rst; /* base + 0x0 */
  14. u32 ctrl; /* base + 0x4 */
  15. u32 status; /* base + 0x8 */
  16. u8 res[0x34]; /* base + 0xc */
  17. };
  18. struct __packed sunxi_cpucfg_reg {
  19. u8 res0[0x40]; /* 0x000 */
  20. struct sunxi_cpucfg_cpu cpu[4]; /* 0x040 */
  21. u8 res1[0x44]; /* 0x140 */
  22. u32 gen_ctrl; /* 0x184 */
  23. u32 l2_status; /* 0x188 */
  24. u8 res2[0x4]; /* 0x18c */
  25. u32 event_in; /* 0x190 */
  26. u8 res3[0xc]; /* 0x194 */
  27. u32 super_standy_flag; /* 0x1a0 */
  28. u32 priv0; /* 0x1a4 */
  29. u32 priv1; /* 0x1a8 */
  30. u8 res4[0x4]; /* 0x1ac */
  31. u32 cpu1_pwr_clamp; /* 0x1b0 sun7i only */
  32. u32 cpu1_pwroff; /* 0x1b4 sun7i only */
  33. u8 res5[0x2c]; /* 0x1b8 */
  34. u32 dbg_ctrl1; /* 0x1e4 */
  35. u8 res6[0x18]; /* 0x1e8 */
  36. u32 idle_cnt0_low; /* 0x200 */
  37. u32 idle_cnt0_high; /* 0x204 */
  38. u32 idle_cnt0_ctrl; /* 0x208 */
  39. u8 res8[0x4]; /* 0x20c */
  40. u32 idle_cnt1_low; /* 0x210 */
  41. u32 idle_cnt1_high; /* 0x214 */
  42. u32 idle_cnt1_ctrl; /* 0x218 */
  43. u8 res9[0x4]; /* 0x21c */
  44. u32 idle_cnt2_low; /* 0x220 */
  45. u32 idle_cnt2_high; /* 0x224 */
  46. u32 idle_cnt2_ctrl; /* 0x228 */
  47. u8 res10[0x4]; /* 0x22c */
  48. u32 idle_cnt3_low; /* 0x230 */
  49. u32 idle_cnt3_high; /* 0x234 */
  50. u32 idle_cnt3_ctrl; /* 0x238 */
  51. u8 res11[0x4]; /* 0x23c */
  52. u32 idle_cnt4_low; /* 0x240 */
  53. u32 idle_cnt4_high; /* 0x244 */
  54. u32 idle_cnt4_ctrl; /* 0x248 */
  55. u8 res12[0x34]; /* 0x24c */
  56. u32 cnt64_ctrl; /* 0x280 */
  57. u32 cnt64_low; /* 0x284 */
  58. u32 cnt64_high; /* 0x288 */
  59. };
  60. #endif /* __ASSEMBLY__ */
  61. #endif /* _SUNXI_CPUCFG_H */