1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-30 17:50:46 +00:00

cpufreq: fix probe method to support Intel machine

Recent Intel machines uses the CPUFreq pstate driver, which does not create
the standard "/sys/devices/system/cpu/cpufreq" folder usually created by
other (mostly ARM platform) drivers.

This patch fixes the probe method to check for the propert pstate driver
being available in order to enabled the CPUFreq module.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
This commit is contained in:
Patrick Bellasi 2015-09-15 10:25:15 +01:00
parent 7ba791b2a7
commit b19d76d4b0

View File

@ -30,6 +30,8 @@ class CpufreqModule(Module):
@staticmethod
def probe(target):
path = '/sys/devices/system/cpu/cpufreq'
if target.abi == 'x86_64':
path = '/sys/devices/system/cpu/intel_pstate'
return target.file_exists(path)
def __init__(self, target):