void aml_cpufreq_max(bool limit) { if (!aml_wired_present() && aml_get_cputype() > 3) { // this is a MX Stick, they cannot substain 1GHz // operation without overheating so limit them to 800MHz. int cpufreq = 1000000; if (limit) cpufreq = 800000; aml_set_sysfs_int("/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq", cpufreq); aml_set_sysfs_str("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor", "ondemand"); } }
void aml_cpufreq_max(bool limit) { if (!aml_wired_present() && aml_get_device_type() == AML_DEVICE_TYPE_M6) { // this is a MX Stick, they cannot substain 1GHz // operation without overheating so limit them to 800MHz. int cpufreq = 1000000; if (limit) cpufreq = 800000; SysfsUtils::SetInt("/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq", cpufreq); SysfsUtils::SetString("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor", "ondemand"); } }