cpufreq_schedutil.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (C) 2016 MediaTek Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. * See http://www.gnu.org/licenses/gpl-2.0.html for more details.
  12. */
  13. enum mt_cpu_dvfs_id {
  14. MT_CPU_DVFS_LL,
  15. MT_CPU_DVFS_L,
  16. MT_CPU_DVFS_B,
  17. MT_CPU_DVFS_CCI,
  18. NR_MT_CPU_DVFS,
  19. };
  20. enum mt_dvfs_debug_id {
  21. DEBUG_FREQ_CLUSTER0,
  22. DEBUG_FREQ_CLUSTER1,
  23. DEBUG_FREQ_CLUSTER2,
  24. DEBUG_FREQ_ALL,
  25. DEBUG_FREQ_DISABLED = 100,
  26. };
  27. enum throttle_type {
  28. DVFS_THROTTLE_UP,
  29. DVFS_THROTTLE_DOWN,
  30. };
  31. #ifdef CONFIG_MTK_CPU_FREQ
  32. #include "../../drivers/misc/mediatek/include/mt-plat/mtk_cpufreq_common_api.h"
  33. #else
  34. static inline int mt_cpufreq_set_by_schedule_load_cluster(
  35. int cid, unsigned int freq) { return 0; }
  36. static inline int mt_cpufreq_set_by_wfi_load_cluster(
  37. int cid, unsigned int freq) { return 0; }
  38. static inline unsigned int mt_cpufreq_find_close_freq(
  39. unsigned int cluster_id, unsigned int freq) { return 0; }
  40. static inline unsigned int mt_cpufreq_get_freq_by_idx(
  41. int cid, int idx) { return 0; }
  42. static inline int mt_cpufreq_get_sched_enable(void) { return 0; }
  43. static inline int mt_cpufreq_get_cur_freq(
  44. enum mt_cpu_dvfs_id id) { return 0; };
  45. #endif