aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/cpu/cpufreq/longhaul.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/cpu/cpufreq/longhaul.c')
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
index 8f40cb47720e..fa5cac255c16 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c
@@ -196,7 +196,7 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
196 inb(cx_address); 196 inb(cx_address);
197 /* Dummy op - must do something useless after P_LVL3 197 /* Dummy op - must do something useless after P_LVL3
198 * read */ 198 * read */
199 t = inl(acpi_fadt.xpm_tmr_blk.address); 199 t = inl(acpi_gbl_FADT.xpm_timer_block.address);
200 } 200 }
201 longhaul.bits.EnableSoftVID = 0; 201 longhaul.bits.EnableSoftVID = 0;
202 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 202 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
@@ -214,7 +214,7 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
214 /* Invoke C3 */ 214 /* Invoke C3 */
215 inb(cx_address); 215 inb(cx_address);
216 /* Dummy op - must do something useless after P_LVL3 read */ 216 /* Dummy op - must do something useless after P_LVL3 read */
217 t = inl(acpi_fadt.xpm_tmr_blk.address); 217 t = inl(acpi_gbl_FADT.xpm_timer_block.address);
218 } 218 }
219 /* Disable bus ratio bit */ 219 /* Disable bus ratio bit */
220 longhaul.bits.EnableSoftBusRatio = 0; 220 longhaul.bits.EnableSoftBusRatio = 0;
@@ -234,7 +234,7 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
234 inb(cx_address); 234 inb(cx_address);
235 /* Dummy op - must do something useless after P_LVL3 235 /* Dummy op - must do something useless after P_LVL3
236 * read */ 236 * read */
237 t = inl(acpi_fadt.xpm_tmr_blk.address); 237 t = inl(acpi_gbl_FADT.xpm_timer_block.address);
238 } 238 }
239 longhaul.bits.EnableSoftVID = 0; 239 longhaul.bits.EnableSoftVID = 0;
240 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 240 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
@@ -291,8 +291,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
291 outb(3, 0x22); 291 outb(3, 0x22);
292 } else if ((pr != NULL) && pr->flags.bm_control) { 292 } else if ((pr != NULL) && pr->flags.bm_control) {
293 /* Disable bus master arbitration */ 293 /* Disable bus master arbitration */
294 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1, 294 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1);
295 ACPI_MTX_DO_NOT_LOCK);
296 } 295 }
297 switch (longhaul_version) { 296 switch (longhaul_version) {
298 297
@@ -322,8 +321,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
322 case TYPE_POWERSAVER: 321 case TYPE_POWERSAVER:
323 if (longhaul_flags & USE_ACPI_C3) { 322 if (longhaul_flags & USE_ACPI_C3) {
324 /* Don't allow wakeup */ 323 /* Don't allow wakeup */
325 acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0, 324 acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
326 ACPI_MTX_DO_NOT_LOCK);
327 do_powersaver(cx->address, clock_ratio_index); 325 do_powersaver(cx->address, clock_ratio_index);
328 } else { 326 } else {
329 do_powersaver(0, clock_ratio_index); 327 do_powersaver(0, clock_ratio_index);
@@ -336,8 +334,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
336 outb(0, 0x22); 334 outb(0, 0x22);
337 } else if ((pr != NULL) && pr->flags.bm_control) { 335 } else if ((pr != NULL) && pr->flags.bm_control) {
338 /* Enable bus master arbitration */ 336 /* Enable bus master arbitration */
339 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0, 337 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0);
340 ACPI_MTX_DO_NOT_LOCK);
341 } 338 }
342 outb(pic2_mask,0xA1); /* restore mask */ 339 outb(pic2_mask,0xA1); /* restore mask */
343 outb(pic1_mask,0x21); 340 outb(pic1_mask,0x21);
@@ -416,7 +413,7 @@ static int __init longhaul_get_ranges(void)
416 highest_speed = calc_speed(maxmult); 413 highest_speed = calc_speed(maxmult);
417 lowest_speed = calc_speed(minmult); 414 lowest_speed = calc_speed(minmult);
418 dprintk ("FSB:%dMHz Lowest speed: %s Highest speed:%s\n", fsb, 415 dprintk ("FSB:%dMHz Lowest speed: %s Highest speed:%s\n", fsb,
419 print_speed(lowest_speed/1000), 416 print_speed(lowest_speed/1000),
420 print_speed(highest_speed/1000)); 417 print_speed(highest_speed/1000));
421 418
422 if (lowest_speed == highest_speed) { 419 if (lowest_speed == highest_speed) {
@@ -531,6 +528,7 @@ static void __init longhaul_setup_voltagescaling(void)
531 /* Calculate kHz for one voltage step */ 528 /* Calculate kHz for one voltage step */
532 kHz_step = (highest_speed - min_vid_speed) / numvscales; 529 kHz_step = (highest_speed - min_vid_speed) / numvscales;
533 530
531
534 j = 0; 532 j = 0;
535 while (longhaul_table[j].frequency != CPUFREQ_TABLE_END) { 533 while (longhaul_table[j].frequency != CPUFREQ_TABLE_END) {
536 speed = longhaul_table[j].frequency; 534 speed = longhaul_table[j].frequency;