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/southbridge/amd | |
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/southbridge/amd')
-rw-r--r-- | src/southbridge/amd/amd8111/amd8111.c | 10 | ||||
-rw-r--r-- | src/southbridge/amd/amd8111/amd8111_acpi.c | 8 | ||||
-rw-r--r-- | src/southbridge/amd/amd8131/amd8131_bridge.c | 6 | ||||
-rw-r--r-- | src/southbridge/amd/amd8132/amd8132_bridge.c | 4 | ||||
-rw-r--r-- | src/southbridge/amd/rs690/rs690.c | 2 | ||||
-rw-r--r-- | src/southbridge/amd/rs690/rs690_cmn.c | 8 | ||||
-rw-r--r-- | src/southbridge/amd/sb600/sb600.c | 12 | ||||
-rw-r--r-- | src/southbridge/amd/sb600/sb600_sm.c | 8 |
8 files changed, 29 insertions, 29 deletions
diff --git a/src/southbridge/amd/amd8111/amd8111.c b/src/southbridge/amd/amd8111/amd8111.c index d5536c4fc1..1390065c09 100644 --- a/src/southbridge/amd/amd8111/amd8111.c +++ b/src/southbridge/amd/amd8111/amd8111.c @@ -17,17 +17,17 @@ void amd8111_enable(device_t dev) (bus_dev->device == PCI_DEVICE_ID_AMD_8111_PCI)) { unsigned devfn; - devfn = bus_dev->path.u.pci.devfn + (1 << 3); + devfn = bus_dev->path.pci.devfn + (1 << 3); lpc_dev = dev_find_slot(bus_dev->bus->secondary, devfn); - index = ((dev->path.u.pci.devfn & ~7) >> 3) + 8; - if (dev->path.u.pci.devfn == 2) { /* EHCI */ + index = ((dev->path.pci.devfn & ~7) >> 3) + 8; + if (dev->path.pci.devfn == 2) { /* EHCI */ index = 16; } } else { unsigned devfn; - devfn = (dev->path.u.pci.devfn) & ~7; + devfn = (dev->path.pci.devfn) & ~7; lpc_dev = dev_find_slot(dev->bus->secondary, devfn); - index = dev->path.u.pci.devfn & 7; + index = dev->path.pci.devfn & 7; } if ((!lpc_dev) || (index >= 17)) { return; diff --git a/src/southbridge/amd/amd8111/amd8111_acpi.c b/src/southbridge/amd/amd8111/amd8111_acpi.c index 7d18b00f0c..57c26910f8 100644 --- a/src/southbridge/amd/amd8111/amd8111_acpi.c +++ b/src/southbridge/amd/amd8111/amd8111_acpi.c @@ -26,7 +26,7 @@ static int lsmbus_recv_byte(device_t dev) unsigned device; struct resource *res; - device = dev->path.u.i2c.device; + device = dev->path.i2c.device; res = find_resource(get_pbus_smbus(dev)->dev, 0x58); return do_smbus_recv_byte(res->base, device); @@ -37,7 +37,7 @@ static int lsmbus_send_byte(device_t dev, uint8_t val) unsigned device; struct resource *res; - device = dev->path.u.i2c.device; + device = dev->path.i2c.device; res = find_resource(get_pbus_smbus(dev)->dev, 0x58); return do_smbus_send_byte(res->base, device, val); @@ -49,7 +49,7 @@ static int lsmbus_read_byte(device_t dev, uint8_t address) unsigned device; struct resource *res; - device = dev->path.u.i2c.device; + device = dev->path.i2c.device; res = find_resource(get_pbus_smbus(dev)->dev, 0x58); return do_smbus_read_byte(res->base, device, address); @@ -60,7 +60,7 @@ static int lsmbus_write_byte(device_t dev, uint8_t address, uint8_t val) unsigned device; struct resource *res; - device = dev->path.u.i2c.device; + device = dev->path.i2c.device; res = find_resource(get_pbus_smbus(dev)->dev, 0x58); return do_smbus_write_byte(res->base, device, address, val); diff --git a/src/southbridge/amd/amd8131/amd8131_bridge.c b/src/southbridge/amd/amd8131/amd8131_bridge.c index 6064219acb..9d85077668 100644 --- a/src/southbridge/amd/amd8131/amd8131_bridge.c +++ b/src/southbridge/amd/amd8131/amd8131_bridge.c @@ -46,8 +46,8 @@ static void amd8131_count_dev(device_t dev, void *ptr) if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) { info->master_devices++; } - if (PCI_FUNC(dev->path.u.pci.devfn) > info->max_func) { - info->max_func = PCI_FUNC(dev->path.u.pci.devfn); + if (PCI_FUNC(dev->path.pci.devfn) > info->max_func) { + info->max_func = PCI_FUNC(dev->path.pci.devfn); } } @@ -76,7 +76,7 @@ static void amd8131_pcix_tune_dev(device_t dev, void *ptr) if (sib == dev) { continue; } - if (PCI_SLOT(sib->path.u.pci.devfn) != PCI_SLOT(dev->path.u.pci.devfn)) { + if (PCI_SLOT(sib->path.pci.devfn) != PCI_SLOT(dev->path.pci.devfn)) { continue; } sib_funcs++; diff --git a/src/southbridge/amd/amd8132/amd8132_bridge.c b/src/southbridge/amd/amd8132/amd8132_bridge.c index f06ef24280..12ef26c171 100644 --- a/src/southbridge/amd/amd8132/amd8132_bridge.c +++ b/src/southbridge/amd/amd8132/amd8132_bridge.c @@ -83,8 +83,8 @@ static void amd8132_count_dev(device_t dev, void *ptr) if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) { info->master_devices++; } - if (PCI_FUNC(dev->path.u.pci.devfn) > info->max_func) { - info->max_func = PCI_FUNC(dev->path.u.pci.devfn); + if (PCI_FUNC(dev->path.pci.devfn) > info->max_func) { + info->max_func = PCI_FUNC(dev->path.pci.devfn); } } diff --git a/src/southbridge/amd/rs690/rs690.c b/src/southbridge/amd/rs690/rs690.c index 3caa00e9c8..e5d6a1e2e7 100644 --- a/src/southbridge/amd/rs690/rs690.c +++ b/src/southbridge/amd/rs690/rs690.c @@ -144,7 +144,7 @@ void rs690_enable(device_t dev) /* NOT REACHED */ } - dev_ind = dev->path.u.pci.devfn >> 3; + dev_ind = dev->path.pci.devfn >> 3; switch (dev_ind) { case 0: /* bus0, dev0, fun0; */ printk_info("Bus-0, Dev-0, Fun-0.\n"); diff --git a/src/southbridge/amd/rs690/rs690_cmn.c b/src/southbridge/amd/rs690/rs690_cmn.c index 302664f3c9..7b6d8fed8f 100644 --- a/src/southbridge/amd/rs690/rs690_cmn.c +++ b/src/southbridge/amd/rs690/rs690_cmn.c @@ -51,9 +51,9 @@ u32 pci_ext_read_config32(device_t nb_dev, device_t dev, u32 reg) /*get BAR3 base address for nbcfg0x1c */ u32 addr = pci_read_config32(nb_dev, 0x1c); printk_debug("addr=%x,bus=%x,devfn=%x\n", addr, dev->bus->secondary, - dev->path.u.pci.devfn); + dev->path.pci.devfn); addr |= dev->bus->secondary << 20 | /* bus num */ - dev->path.u.pci.devfn << 12 | reg; + dev->path.pci.devfn << 12 | reg; return *((u32 *) addr); } @@ -64,9 +64,9 @@ void pci_ext_write_config32(device_t nb_dev, device_t dev, u32 reg_pos, u32 mask /*get BAR3 base address for nbcfg0x1c */ u32 addr = pci_read_config32(nb_dev, 0x1c); /*printk_debug("write: addr=%x,bus=%x,devfn=%x\n", addr, dev->bus->secondary, - dev->path.u.pci.devfn);*/ + dev->path.pci.devfn);*/ addr |= dev->bus->secondary << 20 | /* bus num */ - dev->path.u.pci.devfn << 12 | reg_pos; + dev->path.pci.devfn << 12 | reg_pos; reg = reg_old = *((u32 *) addr); reg &= ~mask; diff --git a/src/southbridge/amd/sb600/sb600.c b/src/southbridge/amd/sb600/sb600.c index ef941ddb01..1e34786b77 100644 --- a/src/southbridge/amd/sb600/sb600.c +++ b/src/southbridge/amd/sb600/sb600.c @@ -146,13 +146,13 @@ void sb600_enable(device_t dev) bus_dev = dev->bus->dev; if ((bus_dev->vendor == PCI_VENDOR_ID_ATI) && (bus_dev->device == PCI_DEVICE_ID_ATI_SB600_PCI)) { - devfn = (bus_dev->path.u.pci.devfn) & ~7; + devfn = (bus_dev->path.pci.devfn) & ~7; sm_dev = find_sm_dev(bus_dev, devfn); if (!sm_dev) return; /* something under 00:01.0 */ - switch (dev->path.u.pci.devfn) { + switch (dev->path.pci.devfn) { case 5 << 3: ; } @@ -160,7 +160,7 @@ void sb600_enable(device_t dev) return; } - i = (dev->path.u.pci.devfn) & ~7; + i = (dev->path.pci.devfn) & ~7; i += (2 << 3); for (devfn = (0x14 << 3); devfn <= i; devfn += (1 << 3)) { sm_dev = find_sm_dev(dev, devfn); @@ -170,7 +170,7 @@ void sb600_enable(device_t dev) if (!sm_dev) return; - switch (dev->path.u.pci.devfn - (devfn - (0x14 << 3))) { + switch (dev->path.pci.devfn - (devfn - (0x14 << 3))) { case (0x12 << 3) | 0: index = 8; set_sm_enable_bits(sm_dev, 0xac, 1 << index, @@ -183,7 +183,7 @@ void sb600_enable(device_t dev) case (0x13 << 3) | 3: case (0x13 << 3) | 4: case (0x13 << 3) | 5: - index = dev->path.u.pci.devfn & 7; + index = dev->path.pci.devfn & 7; index++; index %= 6; set_sm_enable_bits(sm_dev, 0x68, 1 << index, @@ -213,7 +213,7 @@ void sb600_enable(device_t dev) break; case (0x14 << 3) | 5: case (0x14 << 3) | 6: - index = dev->path.u.pci.devfn & 7; + index = dev->path.pci.devfn & 7; index -= 5; set_pmio_enable_bits(sm_dev, 0x59, 1 << index, (dev->enabled ? 0 : 1) << index); diff --git a/src/southbridge/amd/sb600/sb600_sm.c b/src/southbridge/amd/sb600/sb600_sm.c index d6643ab91b..a107d2dfd1 100644 --- a/src/southbridge/amd/sb600/sb600_sm.c +++ b/src/southbridge/amd/sb600/sb600_sm.c @@ -302,7 +302,7 @@ static int lsmbus_recv_byte(device_t dev) struct resource *res; struct bus *pbus; - device = dev->path.u.i2c.device; + device = dev->path.i2c.device; pbus = get_pbus_smbus(dev); res = find_resource(pbus->dev, 0x10); @@ -316,7 +316,7 @@ static int lsmbus_send_byte(device_t dev, u8 val) struct resource *res; struct bus *pbus; - device = dev->path.u.i2c.device; + device = dev->path.i2c.device; pbus = get_pbus_smbus(dev); res = find_resource(pbus->dev, 0x10); @@ -330,7 +330,7 @@ static int lsmbus_read_byte(device_t dev, u8 address) struct resource *res; struct bus *pbus; - device = dev->path.u.i2c.device; + device = dev->path.i2c.device; pbus = get_pbus_smbus(dev); res = find_resource(pbus->dev, 0x10); @@ -344,7 +344,7 @@ static int lsmbus_write_byte(device_t dev, u8 address, u8 val) struct resource *res; struct bus *pbus; - device = dev->path.u.i2c.device; + device = dev->path.i2c.device; pbus = get_pbus_smbus(dev); res = find_resource(pbus->dev, 0x10); |