Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44647
b: refs/heads/master
c: 4e581ff
h: refs/heads/master
i:
  44645: 2e6390a
  44643: e888893
  44639: 5a993ac
v: v3
  • Loading branch information
Venkatesh Pallipadi authored and Dave Jones committed Dec 13, 2006
1 parent 7846062 commit 4352947
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ab70df451c6183dd5474a68edac44684b0b7616
refs/heads/master: 4e581ff165f26ba3d37a4a836b2e3add47bec72f
29 changes: 6 additions & 23 deletions trunk/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 4352947

Please sign in to comment.