cdsprm.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. /*
  6. * This header is for cdspl3 devfreq governor in drivers/devfreq.
  7. */
  8. #ifndef __QCOM_CDSPRM_H__
  9. #define __QCOM_CDSPRM_H__
  10. /**
  11. * struct cdsprm_l3 - register with set L3 clock frequency method
  12. * @set_l3_freq: Sets desired L3 clock frequency in kilo-hertz.
  13. * cdsprm module would call this method to set L3
  14. * clock frequency as requested by CDSP subsystem.
  15. */
  16. struct cdsprm_l3 {
  17. int (*set_l3_freq)(unsigned int freq_khz);
  18. };
  19. /**
  20. * cdsprm_register_cdspl3gov() - Register a method to set L3 clock
  21. * frequency
  22. * @arg: cdsprm_l3 structure with set L3 clock frequency method
  23. *
  24. * Note: To be called from cdspl3 governor only. Called when the governor is
  25. * started.
  26. */
  27. void cdsprm_register_cdspl3gov(struct cdsprm_l3 *arg);
  28. /**
  29. * cdsprm_unregister_cdspl3gov() - Unregister the method to set L3 clock
  30. * frequency
  31. *
  32. * Note: To be called from cdspl3 governor only. Called when the governor is
  33. * stopped
  34. */
  35. void cdsprm_unregister_cdspl3gov(void);
  36. /**
  37. * cdsprm_compute_vtcm_set_partition_map() - Send the vtcm partition and
  38. * map data to cdsp via
  39. * rpmsg channel
  40. * @arg: b_vtcm_partitioning 0 - disable VTCM partitioning
  41. * 1 - enable VTCM partitioning
  42. *@return SUCCESS (0) if vtcm partition and map data is sent
  43. * FAILURE (Non-zero) if vtcm partition and map sent fails
  44. * Note: VTCM partitioning should be defined in the device tree for
  45. * the enable / disable request to go through.
  46. *
  47. */
  48. int cdsprm_compute_vtcm_set_partition_map(unsigned int b_vtcm_partitioning);
  49. #endif