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

Commit 667ad4f7 authored by maximilian attems's avatar maximilian attems Committed by Dave Jones
Browse files

[CPUFREQ] Crusoe: longrun cpufreq module reports false min freq

The longrun cpufreq module reports a false minimum frequency 3MHz on
300-600MHz Crusoe processor.  This may be due to a calculation bug
in the module.

Original patch from Kaz Sasayama <kazssym@hypercore.co.jp>
submitted as http://bugs.debian.org/468149

 patch ported to x86

Cc: Kaz Sasayama <kazssym@hypercore.co.jp>
Signed-off-by: default avatarmaximilian attems <max@stro.at>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent eba9fe93
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
	if ((ecx > 95) || (ecx == 0) || (eax < ebx))
		return -EIO;

	edx = (eax - ebx) / (100 - ecx);
	edx = ((eax - ebx) * 100) / (100 - ecx);
	*low_freq = edx * 1000; /* back to kHz */

	dprintk("low frequency is %u kHz\n", *low_freq);