aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/cpu/cpufreq/longhaul.h
diff options
context:
space:
mode:
authorRafał Bilski <rafalbilski@interia.pl>2006-08-15 19:07:33 -0400
committerDave Jones <davej@redhat.com>2006-09-05 17:28:42 -0400
commitdb44aaf3a2f599163c53ce96658aca688b3466f0 (patch)
treead6bbd01851d911e0641256f5d10531504a85ee4 /arch/i386/kernel/cpu/cpufreq/longhaul.h
parent23e735bc7b0e1d614656881794257b4224efda3a (diff)
[CPUFREQ] Longhaul - Add voltage scaling to driver
Rename option "dont_scale_voltage" to "scale_voltage" because don't will be default. Use "pos" for calculating voltage. In this way driver don't need to know mV value or low level value. Simply min U is one pos and max U is second pos. All pos between these two are used. Assume that min U is for min f and max U for max f. For frequency between min and max calculate pos based on difference between current frequency and min f. Values in mobile VRM table changed to values from C3-M datasheet. Signed-off-by: Rafał Bilski <rafalbilski@interia.pl> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch/i386/kernel/cpu/cpufreq/longhaul.h')
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.h48
1 files changed, 38 insertions, 10 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.h b/arch/i386/kernel/cpu/cpufreq/longhaul.h
index d3a95d77ee85..bc4682aad69b 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.h
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.h
@@ -450,17 +450,45 @@ static int __initdata nehemiah_c_eblcr[32] = {
450 * Voltage scales. Div/Mod by 1000 to get actual voltage. 450 * Voltage scales. Div/Mod by 1000 to get actual voltage.
451 * Which scale to use depends on the VRM type in use. 451 * Which scale to use depends on the VRM type in use.
452 */ 452 */
453static int __initdata vrm85scales[32] = { 453
454 1250, 1200, 1150, 1100, 1050, 1800, 1750, 1700, 454struct mV_pos {
455 1650, 1600, 1550, 1500, 1450, 1400, 1350, 1300, 455 unsigned short mV;
456 1275, 1225, 1175, 1125, 1075, 1825, 1775, 1725, 456 unsigned short pos;
457 1675, 1625, 1575, 1525, 1475, 1425, 1375, 1325, 457};
458
459static struct mV_pos __initdata vrm85_mV[32] = {
460 {1250, 8}, {1200, 6}, {1150, 4}, {1100, 2},
461 {1050, 0}, {1800, 30}, {1750, 28}, {1700, 26},
462 {1650, 24}, {1600, 22}, {1550, 20}, {1500, 18},
463 {1450, 16}, {1400, 14}, {1350, 12}, {1300, 10},
464 {1275, 9}, {1225, 7}, {1175, 5}, {1125, 3},
465 {1075, 1}, {1825, 31}, {1775, 29}, {1725, 27},
466 {1675, 25}, {1625, 23}, {1575, 21}, {1525, 19},
467 {1475, 17}, {1425, 15}, {1375, 13}, {1325, 11}
468};
469
470static unsigned char __initdata mV_vrm85[32] = {
471 0x04, 0x14, 0x03, 0x13, 0x02, 0x12, 0x01, 0x11,
472 0x00, 0x10, 0x0f, 0x1f, 0x0e, 0x1e, 0x0d, 0x1d,
473 0x0c, 0x1c, 0x0b, 0x1b, 0x0a, 0x1a, 0x09, 0x19,
474 0x08, 0x18, 0x07, 0x17, 0x06, 0x16, 0x05, 0x15
475};
476
477static struct mV_pos __initdata mobilevrm_mV[32] = {
478 {1750, 31}, {1700, 30}, {1650, 29}, {1600, 28},
479 {1550, 27}, {1500, 26}, {1450, 25}, {1400, 24},
480 {1350, 23}, {1300, 22}, {1250, 21}, {1200, 20},
481 {1150, 19}, {1100, 18}, {1050, 17}, {1000, 16},
482 {975, 15}, {950, 14}, {925, 13}, {900, 12},
483 {875, 11}, {850, 10}, {825, 9}, {800, 8},
484 {775, 7}, {750, 6}, {725, 5}, {700, 4},
485 {675, 3}, {650, 2}, {625, 1}, {600, 0}
458}; 486};
459 487
460static int __initdata mobilevrmscales[32] = { 488static unsigned char __initdata mV_mobilevrm[32] = {
461 2000, 1950, 1900, 1850, 1800, 1750, 1700, 1650, 489 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18,
462 1600, 1550, 1500, 1450, 1500, 1350, 1300, -1, 490 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10,
463 1275, 1250, 1225, 1200, 1175, 1150, 1125, 1100, 491 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,
464 1075, 1050, 1025, 1000, 975, 950, 925, -1, 492 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00
465}; 493};
466 494