Commit 0e6e4179 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] Fix up some comments in longhaul.

Some of this stuff is very wrong, time to sit down with datasheets
and fix up some of this mess. The problem is this driver pulls info
from multiple datasheets, and some of them conflict.
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 08dfe984
...@@ -5,14 +5,19 @@ ...@@ -5,14 +5,19 @@
* Licensed under the terms of the GNU GPL License version 2. * Licensed under the terms of the GNU GPL License version 2.
* Based upon datasheets & sample CPUs kindly provided by VIA. * Based upon datasheets & sample CPUs kindly provided by VIA.
* *
* VIA have currently 2 different versions of Longhaul. * VIA have currently 3 different versions of Longhaul.
* Version 1 (Longhaul) uses the BCR2 MSR at 0x1147. * Version 1 (Longhaul) uses the BCR2 MSR at 0x1147.
* It is present only in Samuel 1, Samuel 2 and Ezra. * It is present only in Samuel 1 (C5A), Samuel 2 (C5B) stepping 0.
* Version 2 (Powersaver) uses the POWERSAVER MSR at 0x110a. * Version 2 of longhaul is the same as v1, but adds voltage scaling.
* It is present in Ezra-T, Nehemiah and above. * Present in Samuel 2 (steppings 1-7 only) (C5B), and Ezra (C5C)
* In addition to scaling multiplier, it can also scale voltage. * voltage scaling support has currently been disabled in this driver
* There is provision for scaling FSB too, but this doesn't work * until we have code that gets it right.
* too well in practice. * Version 3 of longhaul got renamed to Powersaver and redesigned
* to use the POWERSAVER MSR at 0x110a.
* It is present in Ezra-T (C5M), Nehemiah (C5X) and above.
* It's pretty much the same feature wise to longhaul v2, though
* there is provision for scaling FSB too, but this doesn't work
* too well in practice so we don't even try to use this.
* *
* BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous* * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous*
*/ */
...@@ -126,6 +131,11 @@ static void longhaul_setstate(unsigned int clock_ratio_index) ...@@ -126,6 +131,11 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
dprintk (KERN_INFO PFX "FSB:%d Mult:%d.%dx\n", fsb, mult/10, mult%10); dprintk (KERN_INFO PFX "FSB:%d Mult:%d.%dx\n", fsb, mult/10, mult%10);
switch (longhaul_version) { switch (longhaul_version) {
/*
* Longhaul v1. (Samuel[C5A] and Samuel2 stepping 0[C5B])
* Software controlled multipliers only.
*/
case 1: case 1:
rdmsrl (MSR_VIA_BCR2, bcr2.val); rdmsrl (MSR_VIA_BCR2, bcr2.val);
/* Enable software clock multiplier */ /* Enable software clock multiplier */
...@@ -166,6 +176,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index) ...@@ -166,6 +176,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
longhaul.bits.RevisionKey = 3; longhaul.bits.RevisionKey = 3;
wrmsrl (MSR_VIA_LONGHAUL, longhaul.val); wrmsrl (MSR_VIA_LONGHAUL, longhaul.val);
break; break;
case 3: case 3:
rdmsrl (MSR_VIA_LONGHAUL, longhaul.val); rdmsrl (MSR_VIA_LONGHAUL, longhaul.val);
longhaul.bits.SoftBusRatio = clock_ratio_index & 0xf; longhaul.bits.SoftBusRatio = clock_ratio_index & 0xf;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment