diff options
author | Sven Schnelle <svens@stackframe.org> | 2011-04-05 13:00:33 +0000 |
---|---|---|
committer | Sven Schnelle <svens@stackframe.org> | 2011-04-05 13:00:33 +0000 |
commit | df6fd566ba6f8541ee5611e57bfbab58b632a269 (patch) | |
tree | baea24a69f188b852ca94a6ded26f2045b9f276d /src/mainboard/lenovo | |
parent | b31eb3e4a82a8e81dbe7adf91492e80a8fd5b5f5 (diff) |
X60: use pnp_write_config() instead of custom function
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Sven Schnelle <svens@stackframe.org>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6481 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/lenovo')
-rw-r--r-- | src/mainboard/lenovo/x60/romstage.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/mainboard/lenovo/x60/romstage.c b/src/mainboard/lenovo/x60/romstage.c index bdc2200b55..85b2241df6 100644 --- a/src/mainboard/lenovo/x60/romstage.c +++ b/src/mainboard/lenovo/x60/romstage.c @@ -101,25 +101,20 @@ static void ich7_enable_lpc(void) pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x8e, 0x001c); } -static void pnp_write_register(device_t dev, int reg, int val) -{ - unsigned int port = dev >> 8; - outb(reg, port); - outb(val, port+1); -} - static void early_superio_config(void) { - device_t dev; + int timeout = 100000; + device_t dev = PNP_DEV(0x2e, 3); + + pnp_write_config(dev, 0x29, 0x06); - dev=PNP_DEV(0x2e, 0x00); - pnp_write_register(dev, 0x29, 0x06); + while(!(pnp_read_config(dev, 0x29) & 0x08) && timeout--) + udelay(1000); /* Enable COM1 */ - pnp_write_register(dev, 0x07, 0x03); - pnp_write_register(dev, 0x60, 0x03); - pnp_write_register(dev, 0x61, 0xf8); - pnp_write_register(dev, 0x30, 0x01); + pnp_set_logical_device(dev); + pnp_set_iobase(dev, PNP_IDX_IO0, 0x3f8); + pnp_set_enable(dev, 1); } static void rcba_config(void) |