Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 562d94d9 authored by Mark Langsdorf's avatar Mark Langsdorf Committed by Dave Jones
Browse files

[CPUFREQ] Support different families in fid/did to frequency conversion



The equation to find the frequency given the fid and did is family dependant.

Acked-by: default avatarMark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: default avatarJoachim Deguara <joachim.deguara@amd.com>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 55395ae7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -76,7 +76,10 @@ static u32 find_khz_freq_from_fid(u32 fid)
/* Return a frequency in MHz, given an input fid and did */
static u32 find_freq_from_fiddid(u32 fid, u32 did)
{
	if (current_cpu_data.x86 == 0x10)
		return 100 * (fid + 0x10) >> did;
	else
		return 100 * (fid + 0x8) >> did;
}

static u32 find_khz_freq_from_fiddid(u32 fid, u32 did)