aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-12-17 19:08:11 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-17 19:08:11 -0800
commite25db641c0e6dd49c5db24dbe154048d4a466727 (patch)
tree1e0cd6a728a405aa5b2e73e8d6d55dcb684416ea /arch
parent7686fcf7304eebd2228ec47045cb28ee3c58b1f1 (diff)
parent928ee513c2fc39799cb13302bc02344a849fa37c (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] longhaul compile fix. [CPUFREQ] Advise not to use longhaul on VIA C7. [CPUFREQ] set policy->curfreq on initialization [CPUFREQ] Trivial cleanup for acpi read/write port in acpi-cpufreq.c [CPUFREQ] fixes typo in cpufreq.c
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c33
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.c4
2 files changed, 11 insertions, 26 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 18f4715c655..b735458c6e3 100644
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -126,27 +126,6 @@ static unsigned extract_freq(u32 val, struct acpi_cpufreq_data *data)
}
}
-static void wrport(u16 port, u8 bit_width, u32 value)
-{
- if (bit_width <= 8)
- outb(value, port);
- else if (bit_width <= 16)
- outw(value, port);
- else if (bit_width <= 32)
- outl(value, port);
-}
-
-static void rdport(u16 port, u8 bit_width, u32 * ret)
-{
- *ret = 0;
- if (bit_width <= 8)
- *ret = inb(port);
- else if (bit_width <= 16)
- *ret = inw(port);
- else if (bit_width <= 32)
- *ret = inl(port);
-}
-
struct msr_addr {
u32 reg;
};
@@ -177,7 +156,9 @@ static void do_drv_read(struct drv_cmd *cmd)
rdmsr(cmd->addr.msr.reg, cmd->val, h);
break;
case SYSTEM_IO_CAPABLE:
- rdport(cmd->addr.io.port, cmd->addr.io.bit_width, &cmd->val);
+ acpi_os_read_port((acpi_io_address)cmd->addr.io.port,
+ &cmd->val,
+ (u32)cmd->addr.io.bit_width);
break;
default:
break;
@@ -193,7 +174,9 @@ static void do_drv_write(struct drv_cmd *cmd)
wrmsr(cmd->addr.msr.reg, cmd->val, h);
break;
case SYSTEM_IO_CAPABLE:
- wrport(cmd->addr.io.port, cmd->addr.io.bit_width, cmd->val);
+ acpi_os_write_port((acpi_io_address)cmd->addr.io.port,
+ cmd->val,
+ (u32)cmd->addr.io.bit_width);
break;
default:
break;
@@ -699,14 +682,14 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
if (result)
goto err_freqfree;
- switch (data->cpu_feature) {
+ switch (perf->control_register.space_id) {
case ACPI_ADR_SPACE_SYSTEM_IO:
/* Current speed is unknown and not detectable by IO port */
policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu);
break;
case ACPI_ADR_SPACE_FIXED_HARDWARE:
acpi_cpufreq_driver.get = get_cur_freq_on_cpu;
- get_cur_freq_on_cpu(cpu);
+ policy->cur = get_cur_freq_on_cpu(cpu);
break;
default:
break;
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
index c548daad347..6d9c97a690f 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c
@@ -787,8 +787,10 @@ static int __init longhaul_init(void)
switch (c->x86_model) {
case 6 ... 9:
return cpufreq_register_driver(&longhaul_driver);
+ case 10:
+ printk(KERN_ERR PFX "Use acpi-cpufreq driver for VIA C7\n");
default:
- printk (KERN_INFO PFX "Unknown VIA CPU. Contact davej@codemonkey.org.uk\n");
+ ;;
}
return -ENODEV;