spinlock.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 _SPINLOCK_H_
  13. #define _SPINLOCK_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_SPINLOCK_BASE (0x51000000)
  17. typedef volatile struct
  18. {
  19. uint32_t __0[2]; // 0x00000000
  20. uint32_t spinlockttlsts; // 0x00000008
  21. uint32_t __12[29]; // 0x0000000c
  22. uint32_t spinlockmstid_i; // 0x00000080
  23. uint32_t __132[479]; // 0x00000084
  24. uint32_t spinlocksts_i; // 0x00000800
  25. uint32_t __2052[510]; // 0x00000804
  26. uint32_t spinlockverid; // 0x00000ffc
  27. } HWP_SPINLOCK_T;
  28. #define hwp_spinlock ((HWP_SPINLOCK_T *)REG_ACCESS_ADDRESS(REG_SPINLOCK_BASE))
  29. // spinlocksts_i
  30. typedef union {
  31. uint32_t v;
  32. struct
  33. {
  34. uint32_t taken : 1; // [0], read only
  35. uint32_t __31_1 : 31; // [31:1]
  36. } b;
  37. } REG_SPINLOCK_SPINLOCKSTS_I_T;
  38. // spinlocksts_i
  39. #define SPINLOCK_TAKEN (1 << 0)
  40. #endif // _SPINLOCK_H_