perfmgr_boost.c 869 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #include <linux/seq_file.h>
  2. #include <linux/kallsyms.h>
  3. #include <linux/utsname.h>
  4. #include <asm/uaccess.h>
  5. #include <linux/printk.h>
  6. #include <linux/string.h>
  7. #include <linux/notifier.h>
  8. #include <linux/platform_device.h>
  9. #include "mt_hotplug_strategy.h"
  10. #include "mt_cpufreq.h"
  11. /*--------------DEFAULT SETTING-------------------*/
  12. #define TARGET_CORE (3)
  13. #define TARGET_FREQ (819000)
  14. /*-----------------------------------------------*/
  15. int perfmgr_get_target_core(void)
  16. {
  17. return TARGET_CORE;
  18. }
  19. int perfmgr_get_target_freq(void)
  20. {
  21. return TARGET_FREQ;
  22. }
  23. void perfmgr_boost(int enable, int core, int freq)
  24. {
  25. if (enable) {
  26. /* hps */
  27. hps_set_cpu_num_base(BASE_PERF_SERV, core, 0);
  28. mt_cpufreq_set_min_freq(MT_CPU_DVFS_LITTLE, freq);
  29. } else {
  30. /* hps */
  31. hps_set_cpu_num_base(BASE_PERF_SERV, 1, 0);
  32. mt_cpufreq_set_min_freq(MT_CPU_DVFS_LITTLE, 0);
  33. }
  34. }