bwprof.h 909 B

123456789101112131415161718192021222324252627
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. #ifndef _QCOM_BWPROF_H
  6. #define _QCOM_BWPROF_H
  7. #define HW_HZ 19200000
  8. #define HW_SAMPLE_MS 50
  9. #define HW_SAMPLE_TICKS mult_frac(HW_SAMPLE_MS, HW_HZ, \
  10. MSEC_PER_SEC)
  11. #define BWMON_EN(m) ((m)->base + 0x10)
  12. #define BWMON_CLEAR(m) ((m)->base + 0x14)
  13. #define BWMON_SW(m) ((m)->base + 0x20)
  14. #define BWMON_THRES_HI(m) ((m)->base + 0x24)
  15. #define BWMON_THRES_MED(m) ((m)->base + 0x28)
  16. #define BWMON_THRES_LO(m) ((m)->base + 0x2C)
  17. #define BWMON_ZONE_ACTIONS(m) ((m)->base + 0x30)
  18. #define BWMON_ZONE_CNT_THRES(m) ((m)->base + 0x34)
  19. #define BWMON_BYTE_CNT(m) ((m)->base + 0x38)
  20. #define BWMON_ZONE_CNT(m) ((m)->base + 0x40)
  21. #define BWMON_ZONE1_MAX_BYTE_COUNT(m) ((m)->base + 0x48)
  22. #define DDR_FREQ(m) ((m)->memfreq_base + 0x00)
  23. #endif /* _QCOM_BWPROF_H */