diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2009-02-28 20:10:20 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2009-02-28 20:10:20 +0000 |
commit | 2b34db8d1de2d63ffa829fe03db0ce2aaba40233 (patch) | |
tree | ba18eb28d25a5e5d28c3b8609b5a292982eed08c /src/devices/pnp_device.c | |
parent | 3c924d2f48ba1bb6a9d5a20453f230bb6be726e0 (diff) |
coreboot-v2: drop this ugly historic union name in v2 that was dropped in v3
a long time ago. This will make it easier to port v2 boards forward to v3 at
some point (and other things)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3964 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/pnp_device.c')
-rw-r--r-- | src/devices/pnp_device.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/devices/pnp_device.c b/src/devices/pnp_device.c index 8b5acecfcf..403fa6afe9 100644 --- a/src/devices/pnp_device.c +++ b/src/devices/pnp_device.c @@ -34,19 +34,19 @@ void pnp_write_config(device_t dev, uint8_t reg, uint8_t value) { - outb(reg, dev->path.u.pnp.port); - outb(value, dev->path.u.pnp.port + 1); + outb(reg, dev->path.pnp.port); + outb(value, dev->path.pnp.port + 1); } uint8_t pnp_read_config(device_t dev, uint8_t reg) { - outb(reg, dev->path.u.pnp.port); - return inb(dev->path.u.pnp.port + 1); + outb(reg, dev->path.pnp.port); + return inb(dev->path.pnp.port + 1); } void pnp_set_logical_device(device_t dev) { - pnp_write_config(dev, 0x07, dev->path.u.pnp.device & 0xff); + pnp_write_config(dev, 0x07, dev->path.pnp.device & 0xff); } void pnp_set_enable(device_t dev, int enable) @@ -55,7 +55,7 @@ void pnp_set_enable(device_t dev, int enable) tmp = pnp_read_config(dev, 0x30); /* handle the virtual devices, which share same LDN register */ - bitpos = (dev->path.u.pnp.device >> 8) & 0x7; + bitpos = (dev->path.pnp.device >> 8) & 0x7; if (enable) { tmp |= (1 << bitpos); @@ -70,7 +70,7 @@ int pnp_read_enable(device_t dev) uint8_t tmp, bitpos; tmp = pnp_read_config(dev, 0x30); /* handle the virtual devices, which share same LDN register */ - bitpos = (dev->path.u.pnp.device >> 8) & 0x7; + bitpos = (dev->path.pnp.device >> 8) & 0x7; return !!(tmp & (1 << bitpos)); } @@ -251,7 +251,7 @@ void pnp_enable_devices(device_t base_dev, struct device_operations *ops, int i; path.type = DEVICE_PATH_PNP; - path.u.pnp.port = base_dev->path.u.pnp.port; + path.pnp.port = base_dev->path.pnp.port; /* Setup the ops and resources on the newly allocated devices */ for(i = 0; i < functions; i++) { @@ -259,7 +259,7 @@ void pnp_enable_devices(device_t base_dev, struct device_operations *ops, if (info[i].function == -1) continue; - path.u.pnp.device = info[i].function; + path.pnp.device = info[i].function; dev = alloc_find_dev(base_dev->bus, &path); /* Don't initialize a device multiple times */ |