[v1.03][PPC] Read frequency from cpuinfo if the default method fails

This commit is contained in:
Dr-Noob
2023-05-04 19:01:55 +02:00
parent 93f733cb12
commit 8e95828fb1
6 changed files with 61 additions and 21 deletions

View File

@@ -146,6 +146,12 @@ struct frequency* get_frequency_info(void) {
freq->max = get_max_freq_from_file(0);
freq->base = get_min_freq_from_file(0);
if(freq->max == UNKNOWN_DATA) {
// If we are unable to find it in the
// standard path, try /proc/cpuinfo
freq->max = get_frequency_from_cpuinfo();
}
return freq;
}