bfin_pfmon.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Blackfin Performance Monitor definitions
  3. *
  4. * Copyright 2005-2011 Analog Devices Inc.
  5. *
  6. * Licensed under the Clear BSD license or GPL-2 (or later).
  7. */
  8. #ifndef __ASM_BFIN_PFMON_H__
  9. #define __ASM_BFIN_PFMON_H__
  10. /* PFCTL Masks */
  11. #define PFMON_MASK 0xff
  12. #define PFCEN_MASK 0x3
  13. #define PFCEN_DISABLE 0x0
  14. #define PFCEN_ENABLE_USER 0x1
  15. #define PFCEN_ENABLE_SUPV 0x2
  16. #define PFCEN_ENABLE_ALL (PFCEN_ENABLE_USER | PFCEN_ENABLE_SUPV)
  17. #define PFPWR_P 0
  18. #define PEMUSW0_P 2
  19. #define PFCEN0_P 3
  20. #define PFMON0_P 5
  21. #define PEMUSW1_P 13
  22. #define PFCEN1_P 14
  23. #define PFMON1_P 16
  24. #define PFCNT0_P 24
  25. #define PFCNT1_P 25
  26. #define PFPWR (1 << PFPWR_P)
  27. #define PEMUSW(n, x) ((x) << ((n) ? PEMUSW1_P : PEMUSW0_P))
  28. #define PEMUSW0 PEMUSW(0, 1)
  29. #define PEMUSW1 PEMUSW(1, 1)
  30. #define PFCEN(n, x) ((x) << ((n) ? PFCEN1_P : PFCEN0_P))
  31. #define PFCEN0 PFCEN(0, PFCEN_MASK)
  32. #define PFCEN1 PFCEN(1, PFCEN_MASK)
  33. #define PFCNT(n, x) ((x) << ((n) ? PFCNT1_P : PFCNT0_P))
  34. #define PFCNT0 PFCNT(0, 1)
  35. #define PFCNT1 PFCNT(1, 1)
  36. #define PFMON(n, x) ((x) << ((n) ? PFMON1_P : PFMON0_P))
  37. #define PFMON0 PFMON(0, PFMON_MASK)
  38. #define PFMON1 PFMON(1, PFMON_MASK)
  39. #endif