fsl_epu.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright 2014 Freescale Semiconductor, Inc.
  4. */
  5. #ifndef __FSL_EPU_H
  6. #define __FSL_EPU_H
  7. #include <asm/types.h>
  8. #define FSL_STRIDE_4B 4
  9. #define FSL_STRIDE_8B 8
  10. /* Block offsets */
  11. #define EPU_BLOCK_OFFSET 0x00000000
  12. /* EPGCR (Event Processor Global Control Register) */
  13. #define EPGCR 0x000
  14. /* EPEVTCR0-9 (Event Processor EVT Pin Control Registers) */
  15. #define EPEVTCR0 0x050
  16. #define EPEVTCR9 0x074
  17. #define EPEVTCR_STRIDE FSL_STRIDE_4B
  18. /* EPXTRIGCR (Event Processor Crosstrigger Control Register) */
  19. #define EPXTRIGCR 0x090
  20. /* EPIMCR0-31 (Event Processor Input Mux Control Registers) */
  21. #define EPIMCR0 0x100
  22. #define EPIMCR31 0x17C
  23. #define EPIMCR_STRIDE FSL_STRIDE_4B
  24. /* EPSMCR0-15 (Event Processor SCU Mux Control Registers) */
  25. #define EPSMCR0 0x200
  26. #define EPSMCR15 0x278
  27. #define EPSMCR_STRIDE FSL_STRIDE_8B
  28. /* EPECR0-15 (Event Processor Event Control Registers) */
  29. #define EPECR0 0x300
  30. #define EPECR15 0x33C
  31. #define EPECR_STRIDE FSL_STRIDE_4B
  32. /* EPACR0-15 (Event Processor Action Control Registers) */
  33. #define EPACR0 0x400
  34. #define EPACR15 0x43C
  35. #define EPACR_STRIDE FSL_STRIDE_4B
  36. /* EPCCRi0-15 (Event Processor Counter Control Registers) */
  37. #define EPCCR0 0x800
  38. #define EPCCR15 0x83C
  39. #define EPCCR31 0x87C
  40. #define EPCCR_STRIDE FSL_STRIDE_4B
  41. /* EPCMPR0-15 (Event Processor Counter Compare Registers) */
  42. #define EPCMPR0 0x900
  43. #define EPCMPR15 0x93C
  44. #define EPCMPR31 0x97C
  45. #define EPCMPR_STRIDE FSL_STRIDE_4B
  46. /* EPCTR0-31 (Event Processor Counter Register) */
  47. #define EPCTR0 0xA00
  48. #define EPCTR31 0xA7C
  49. #define EPCTR_STRIDE FSL_STRIDE_4B
  50. #define FSM_END_FLAG 0xFFFFFFFFUL
  51. struct fsm_reg_vals {
  52. u32 offset;
  53. u32 value;
  54. };
  55. void fsl_epu_setup(void *epu_base);
  56. void fsl_epu_clean(void *epu_base);
  57. #endif