qnoc-qos-rpm.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. #ifndef __DRIVERS_INTERCONNECT_QCOM_QNOC_QOS_RPM_H__
  6. #define __DRIVERS_INTERCONNECT_QCOM_QNOC_QOS_RPM_H__
  7. #define QOSGEN_OFF_MAX_REGS 6
  8. #define ICC_QNOC_QOS_MAX_TYPE 1
  9. enum {
  10. ICC_QNOC_QOSGEN_TYPE_RPMH,
  11. };
  12. enum {
  13. QOSGEN_OFF_MAINCTL_LO,
  14. QOSGEN_OFF_LIMITBW_LO,
  15. QOSGEN_OFF_SHAPING_LO,
  16. QOSGEN_OFF_SHAPING_HI,
  17. QOSGEN_OFF_REGUL0CTL_LO,
  18. QOSGEN_OFF_REGUL0BW_LO,
  19. };
  20. enum {
  21. QOSGEN_OFF_MPORT_BKE_HEALTH,
  22. QOSGEN_OFF_MPORT_BKE_EN,
  23. };
  24. extern const u8 icc_qnoc_qos_regs[ICC_QNOC_QOS_MAX_TYPE][QOSGEN_OFF_MAX_REGS];
  25. extern const u8 icc_bimc_qos_regs[ICC_QNOC_QOS_MAX_TYPE][QOSGEN_OFF_MAX_REGS];
  26. struct qcom_icc_noc_ops {
  27. void (*set_qos)(struct qcom_icc_node *node);
  28. };
  29. struct qos_config {
  30. u32 prio;
  31. u32 urg_fwd;
  32. bool prio_fwd_disable;
  33. u32 bke_enable;
  34. };
  35. struct qcom_icc_qosbox {
  36. u32 num_ports;
  37. const u8 *regs;
  38. bool initialized;
  39. struct qos_config *config;
  40. u32 offsets[];
  41. };
  42. extern const struct qcom_icc_noc_ops qcom_qnoc4_ops;
  43. extern const struct qcom_icc_noc_ops qcom_bimc_ops;
  44. #endif