coreboot-v2: drop this ugly historic union name in v2 that was dropped in v3
authorStefan Reinauer <stepan@coresystems.de>
Sat, 28 Feb 2009 20:10:20 +0000 (20:10 +0000)
committerStefan Reinauer <stepan@openbios.org>
Sat, 28 Feb 2009 20:10:20 +0000 (20:10 +0000)
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

99 files changed:
src/arch/i386/smp/mpspec.c
src/cpu/amd/dualcore/amd_sibling.c
src/cpu/amd/model_gx2/vsmsetup.c
src/cpu/amd/model_lx/vsmsetup.c
src/cpu/intel/hyperthreading/intel_sibling.c
src/cpu/simple_init/simple_cpu_init.c
src/cpu/x86/lapic/lapic_cpu_init.c
src/devices/agp_device.c
src/devices/device_util.c
src/devices/emulator/biosemu.c
src/devices/emulator/pcbios/pcibios.c
src/devices/hypertransport.c
src/devices/pci_device.c
src/devices/pci_ops.c
src/devices/pciexp_device.c
src/devices/pcix_device.c
src/devices/pnp_device.c
src/drivers/generic/debug/debug_dev.c
src/include/device/path.h
src/mainboard/amd/dbm690t/mainboard.c
src/mainboard/amd/pistachio/mainboard.c
src/mainboard/arima/hdama/mptable.c
src/mainboard/artecgroup/dbe61/realmode/vgabios.c
src/mainboard/emulation/qemu-x86/vgabios.c
src/mainboard/tyan/s2881/mainboard.c
src/mainboard/via/epia-m/vgabios.c
src/northbridge/amd/amdfam10/amdfam10_acpi.c
src/northbridge/amd/amdfam10/misc_control.c
src/northbridge/amd/amdfam10/northbridge.c
src/northbridge/amd/amdk8/amdk8_acpi.c
src/northbridge/amd/amdk8/misc_control.c
src/northbridge/amd/amdk8/northbridge.c
src/northbridge/via/cn700/vgabios.c
src/southbridge/amd/amd8111/amd8111.c
src/southbridge/amd/amd8111/amd8111_acpi.c
src/southbridge/amd/amd8131/amd8131_bridge.c
src/southbridge/amd/amd8132/amd8132_bridge.c
src/southbridge/amd/rs690/rs690.c
src/southbridge/amd/rs690/rs690_cmn.c
src/southbridge/amd/sb600/sb600.c
src/southbridge/amd/sb600/sb600_sm.c
src/southbridge/broadcom/bcm5785/bcm5785.c
src/southbridge/broadcom/bcm5785/bcm5785_sata.c
src/southbridge/broadcom/bcm5785/bcm5785_sb_pci_main.c
src/southbridge/intel/esb6300/esb6300.c
src/southbridge/intel/esb6300/esb6300_smbus.c
src/southbridge/intel/i3100/i3100.c
src/southbridge/intel/i3100/i3100_smbus.c
src/southbridge/intel/i82801ca/i82801ca.c
src/southbridge/intel/i82801dbm/i82801dbm.c
src/southbridge/intel/i82801er/i82801er.c
src/southbridge/intel/i82801er/i82801er_smbus.c
src/southbridge/intel/i82801gx/i82801gx_smbus.c
src/southbridge/intel/i82801xx/i82801xx.c
src/southbridge/intel/i82801xx/i82801xx_smbus.c
src/southbridge/intel/i82870/p64h2_ioapic.c
src/southbridge/intel/pxhd/pxhd_bridge.c
src/southbridge/nvidia/ck804/ck804.c
src/southbridge/nvidia/ck804/ck804_smbus.c
src/southbridge/nvidia/mcp55/mcp55.c
src/southbridge/nvidia/mcp55/mcp55_smbus.c
src/southbridge/ricoh/rl5c476/rl5c476.c
src/southbridge/sis/sis966/sis761.c
src/southbridge/sis/sis966/sis966.c
src/superio/fintek/f71805f/superio.c
src/superio/intel/i3100/superio.c
src/superio/ite/it8661f/superio.c
src/superio/ite/it8671f/superio.c
src/superio/ite/it8673f/superio.c
src/superio/ite/it8705f/superio.c
src/superio/ite/it8712f/superio.c
src/superio/ite/it8716f/superio.c
src/superio/ite/it8718f/superio.c
src/superio/nsc/pc8374/superio.c
src/superio/nsc/pc87309/superio.c
src/superio/nsc/pc87351/superio.c
src/superio/nsc/pc87360/superio.c
src/superio/nsc/pc87366/superio.c
src/superio/nsc/pc87417/superio.c
src/superio/nsc/pc87427/superio.c
src/superio/nsc/pc97307/superio.c
src/superio/nsc/pc97317/superio.c
src/superio/smsc/fdc37m60x/superio.c
src/superio/smsc/lpc47b272/superio.c
src/superio/smsc/lpc47b397/superio.c
src/superio/smsc/lpc47m10x/superio.c
src/superio/smsc/lpc47n217/superio.c
src/superio/smsc/smscsuperio/superio.c
src/superio/via/vt1211/vt1211.c
src/superio/winbond/w83627dhg/superio.c
src/superio/winbond/w83627ehg/superio.c
src/superio/winbond/w83627hf/superio.c
src/superio/winbond/w83627thf/superio.c
src/superio/winbond/w83627thg/superio.c
src/superio/winbond/w83627uhg/superio.c
src/superio/winbond/w83697hf/superio.c
src/superio/winbond/w83977f/superio.c
src/superio/winbond/w83977tf/superio.c
util/newconfig/config.g

index c8d966f7fd5b62c3e37dea188bb6bef9c2c77d8b..4e2f76dd53a12bdbf20501caac60c0968db31e3b 100644 (file)
@@ -144,11 +144,11 @@ void smp_write_processors(struct mp_config_table *mc)
                        continue;
                }
                cpu_flag = MPC_CPU_ENABLED;
-               if (boot_apic_id == cpu->path.u.apic.apic_id) {
+               if (boot_apic_id == cpu->path.apic.apic_id) {
                        cpu_flag = MPC_CPU_ENABLED | MPC_CPU_BOOTPROCESSOR;
                }
                smp_write_processor(mc, 
-                       cpu->path.u.apic.apic_id, apic_version,
+                       cpu->path.apic.apic_id, apic_version,
                        cpu_flag, cpu_features, cpu_feature_flags
                );
        }
@@ -229,7 +229,7 @@ void smp_write_intsrc_pci_bridge(struct mp_config_table *mc,
                        if (child->path.type != DEVICE_PATH_PCI)
                                goto next;
 
-                       slot = (child->path.u.pci.devfn >> 3);
+                       slot = (child->path.pci.devfn >> 3);
                        /* round pins */
                        for (i = 0; i < 4; i++)
                                dstirq_x[i] = dstirq[(i + slot) % 4];
index 3bd604a79f520e23bfbeb8fc96e81304b68c869e..15c319c4a9b62122ad3a4d653cc13d0b538b240a 100644 (file)
@@ -142,7 +142,7 @@ void amd_sibling_init(device_t cpu)
 
 #if 1
        printk_debug("CPU: %u %d siblings\n",
-               cpu->path.u.apic.apic_id,
+               cpu->path.apic.apic_id,
                siblings);
 #endif
 
@@ -151,8 +151,8 @@ void amd_sibling_init(device_t cpu)
        id = get_node_core_id(nb_cfg_54); // pre e0 nb_cfg_54 can not be set
 
        /* See if I am a sibling cpu */
-       //if ((cpu->path.u.apic.apic_id>>(nb_cfg_54?0:3)) & siblings ) { // siblings = 1, 3, 7, 15,....
-       //if ( ( (cpu->path.u.apic.apic_id>>(nb_cfg_54?0:3)) % (siblings+1) ) != 0 ) {
+       //if ((cpu->path.apic.apic_id>>(nb_cfg_54?0:3)) & siblings ) { // siblings = 1, 3, 7, 15,....
+       //if ( ( (cpu->path.apic.apic_id>>(nb_cfg_54?0:3)) % (siblings+1) ) != 0 ) {
        if(id.coreid != 0) {
                if (disable_siblings) {
                         cpu->enabled = 0;
@@ -168,12 +168,12 @@ void amd_sibling_init(device_t cpu)
                device_t new;
                /* Build the cpu device path */
                cpu_path.type = DEVICE_PATH_APIC;
-               cpu_path.u.apic.apic_id = cpu->path.u.apic.apic_id + i * (nb_cfg_54?1:8);
+               cpu_path.apic.apic_id = cpu->path.apic.apic_id + i * (nb_cfg_54?1:8);
                 if(id.nodeid == 0) {
                         // need some special processing, because may the bsp is not lifted, but the core1 is lifted
                        //defined in northbridge.c
                         if(sysconf.enabled_apic_ext_id && (!sysconf.lift_bsp_apicid)) {
-                               cpu->path.u.apic.apic_id += sysconf.apicid_offset;
+                               cpu->path.apic.apic_id += sysconf.apicid_offset;
                         }
 
                 }
@@ -188,13 +188,13 @@ void amd_sibling_init(device_t cpu)
                        new->initialized = 0;
                }
 
-                new->path.u.apic.node_id = cpu->path.u.apic.node_id;
-                new->path.u.apic.core_id = i;
+                new->path.apic.node_id = cpu->path.apic.node_id;
+                new->path.apic.core_id = i;
 
 #if 1
                printk_debug("CPU: %u has sibling %u\n", 
-                       cpu->path.u.apic.apic_id,
-                       new->path.u.apic.apic_id);
+                       cpu->path.apic.apic_id,
+                       new->path.apic.apic_id);
 #endif
 
                if(new->enabled && !new->initialized)
index 8c0adf891aa54a42c2307aa813ea13be5640eaa1..dc1b6808362c53672a9f020c5f141fed31898e69 100644 (file)
@@ -651,7 +651,7 @@ pcibios(unsigned long *pedi, unsigned long *pesi, unsigned long *pebp,
                        // busnum is an unsigned char;
                        // devfn is an int, so we mask it off. 
                        busdevfn = (dev->bus->secondary << 8)
-                               | (dev->path.u.pci.devfn & 0xff);
+                               | (dev->path.pci.devfn & 0xff);
                        printk_debug("0x%x: return 0x%x\n", func, busdevfn);
                        *pebx = busdevfn;
                        retval = 0;
index baf96c0bbc86b221b93edcd6827bd68781635a58..9c47a4f6d982990ebf22194a2aff0015e75cef87 100644 (file)
@@ -661,7 +661,7 @@ pcibios(unsigned long *pedi, unsigned long *pesi, unsigned long *pebp,
                                // busnum is an unsigned char;
                                // devfn is an int, so we mask it off.
                                busdevfn = (dev->bus->secondary << 8)
-                                   | (dev->path.u.pci.devfn & 0xff);
+                                   | (dev->path.pci.devfn & 0xff);
                                printk_debug("0x%x: return 0x%x\n", func,
                                             busdevfn);
                                *pebx = busdevfn;
index 13bfdf35fb1ce8782a7417d3c4c6374bafae4918..35f509e195652eaa5d280ac29b5622a5d6ab12c3 100644 (file)
@@ -32,12 +32,12 @@ void intel_sibling_init(device_t cpu)
 
 #if 1
        printk_debug("CPU: %u %d siblings\n",
-               cpu->path.u.apic.apic_id,
+               cpu->path.apic.apic_id,
                siblings);
 #endif
 
        /* See if I am a sibling cpu */
-       if (cpu->path.u.apic.apic_id & (siblings -1)) {
+       if (cpu->path.apic.apic_id & (siblings -1)) {
                if (disable_siblings) {
                        cpu->enabled = 0;
                }
@@ -50,7 +50,7 @@ void intel_sibling_init(device_t cpu)
                device_t new;
                /* Build the cpu device path */
                cpu_path.type = DEVICE_PATH_APIC;
-               cpu_path.u.apic.apic_id = cpu->path.u.apic.apic_id + i;
+               cpu_path.apic.apic_id = cpu->path.apic.apic_id + i;
 
 
                /* Allocate the new cpu device structure */
@@ -62,14 +62,14 @@ void intel_sibling_init(device_t cpu)
 
 #if 1
                printk_debug("CPU: %u has sibling %u\n", 
-                       cpu->path.u.apic.apic_id,
-                       new->path.u.apic.apic_id);
+                       cpu->path.apic.apic_id,
+                       new->path.apic.apic_id);
 #endif
                /* Start the new cpu */
                if (!start_cpu(new)) {
                        /* Record the error in cpu? */
                        printk_err("CPU %u would not start!\n",
-                               new->path.u.apic.apic_id);
+                               new->path.apic.apic_id);
                }
        }
        
index e0a80c6820ed351aff27b1d568c555e2f109f767..2138497a045b0e92c001f8465c0c3ccc8042148d 100644 (file)
@@ -17,7 +17,7 @@ void initialize_cpus(struct bus *cpu_bus)
        
        /* Get the device path of the boot cpu */
        cpu_path.type = DEVICE_PATH_CPU;
-       cpu_path.u.cpu.id = 0;
+       cpu_path.cpu.id = 0;
 
        /* Find the device struct for the boot cpu */
        info->cpu = alloc_find_dev(cpu_bus, &cpu_path);
index 4a879c561a67a4236ab1d65ea0fb4ab86e9b7c33..2025621aa8c71fffaa4b82db420d8cc50afba507 100644 (file)
@@ -223,7 +223,7 @@ int start_cpu(device_t cpu)
        spin_lock(&start_cpu_lock);
 
        /* Get the cpu's apicid */
-       apicid = cpu->path.u.apic.apic_id;
+       apicid = cpu->path.apic.apic_id;
 
        /* Get an index for the new processor */
        index = ++last_cpu_index;
@@ -389,7 +389,7 @@ static void start_other_cpus(struct bus *cpu_bus, device_t bsp_cpu)
                if (!start_cpu(cpu)) {
                        /* Record the error in cpu? */
                        printk_err("CPU 0x%02x would not start!\n",
-                               cpu->path.u.apic.apic_id);
+                               cpu->path.apic.apic_id);
                }
 #if SERIAL_CPU_INIT == 1
   #if CONFIG_MAX_CPUS>2
@@ -421,7 +421,7 @@ static void wait_other_cpus_stop(struct bus *cpu_bus)
                }
                if (!cpu->initialized) {
                        printk_err("CPU 0x%02x did not initialize!\n", 
-                               cpu->path.u.apic.apic_id);
+                               cpu->path.apic.apic_id);
                }
        }
        printk_debug("All AP CPUs stopped\n");
@@ -455,11 +455,11 @@ void initialize_cpus(struct bus *cpu_bus)
 
        /* Get the device path of the boot cpu */
        cpu_path.type           = DEVICE_PATH_APIC;
-       cpu_path.u.apic.apic_id = lapicid();
+       cpu_path.apic.apic_id = lapicid();
 #else
        /* Get the device path of the boot cpu */
        cpu_path.type           = DEVICE_PATH_CPU;
-       cpu_path.u.cpu.id       = 0;
+       cpu_path.cpu.id       = 0;
 #endif
 
        /* Find the device structure for the boot cpu */
index 517118be990f405ea407a1f84b4a20197e9f6fe8..87c3a200823226afe8babbc2ea59aa66ef035b60 100644 (file)
@@ -40,8 +40,8 @@ unsigned int agp_scan_bus(struct bus *bus,
        device_t child;
        max = pci_scan_bus(bus, min_devfn, max_devfn, max);
        for(child = bus->children; child; child = child->sibling) {
-               if (    (child->path.u.pci.devfn < min_devfn) ||
-                       (child->path.u.pci.devfn > max_devfn))
+               if (    (child->path.pci.devfn < min_devfn) ||
+                       (child->path.pci.devfn > max_devfn))
                {
                        continue;
                }
index c18385073c5d00dbafc1a81b19cca07ab1f3c4d1..a03d983dbcd2b653e6f3b0c27a76827dde1f038c 100644 (file)
@@ -80,7 +80,7 @@ struct device *dev_find_slot(unsigned int bus, unsigned int devfn)
        for (dev = all_devices; dev; dev = dev->next) {
                if ((dev->path.type == DEVICE_PATH_PCI) &&
                        (dev->bus->secondary == bus) && 
-                       (dev->path.u.pci.devfn == devfn)) {
+                       (dev->path.pci.devfn == devfn)) {
                        result = dev;
                        break;
                }
@@ -103,7 +103,7 @@ struct device *dev_find_slot_on_smbus(unsigned int bus, unsigned int addr)
         for (dev = all_devices; dev; dev = dev->next) {
                 if ((dev->path.type == DEVICE_PATH_I2C) &&
                         (dev->bus->secondary == bus) && 
-                        (dev->path.u.i2c.device == addr)) {
+                        (dev->path.i2c.device == addr)) {
                         result = dev;
                         break; 
                 }       
@@ -166,39 +166,39 @@ const char *dev_path(device_t dev)
 #if PCI_BUS_SEGN_BITS
                        sprintf(buffer, "PCI: %04x:%02x:%02x.%01x",
                                dev->bus->secondary>>8, dev->bus->secondary & 0xff, 
-                               PCI_SLOT(dev->path.u.pci.devfn), PCI_FUNC(dev->path.u.pci.devfn));
+                               PCI_SLOT(dev->path.pci.devfn), PCI_FUNC(dev->path.pci.devfn));
 #else
                        sprintf(buffer, "PCI: %02x:%02x.%01x",
                                dev->bus->secondary, 
-                               PCI_SLOT(dev->path.u.pci.devfn), PCI_FUNC(dev->path.u.pci.devfn));
+                               PCI_SLOT(dev->path.pci.devfn), PCI_FUNC(dev->path.pci.devfn));
 #endif
                        break;
                case DEVICE_PATH_PNP:
                        sprintf(buffer, "PNP: %04x.%01x",
-                               dev->path.u.pnp.port, dev->path.u.pnp.device);
+                               dev->path.pnp.port, dev->path.pnp.device);
                        break;
                case DEVICE_PATH_I2C:
                        sprintf(buffer, "I2C: %02x:%02x",
                                dev->bus->secondary,
-                               dev->path.u.i2c.device);
+                               dev->path.i2c.device);
                        break;
                case DEVICE_PATH_APIC:
                        sprintf(buffer, "APIC: %02x",
-                               dev->path.u.apic.apic_id);
+                               dev->path.apic.apic_id);
                        break;
                case DEVICE_PATH_PCI_DOMAIN:
                        sprintf(buffer, "PCI_DOMAIN: %04x",
-                               dev->path.u.pci_domain.domain);
+                               dev->path.pci_domain.domain);
                        break;
                case DEVICE_PATH_APIC_CLUSTER:
                        sprintf(buffer, "APIC_CLUSTER: %01x",
-                               dev->path.u.apic_cluster.cluster);
+                               dev->path.apic_cluster.cluster);
                        break;
                case DEVICE_PATH_CPU:
-                       sprintf(buffer, "CPU: %02x", dev->path.u.cpu.id);
+                       sprintf(buffer, "CPU: %02x", dev->path.cpu.id);
                        break;
                case DEVICE_PATH_CPU_BUS:
-                       sprintf(buffer, "CPU_BUS: %02x", dev->path.u.cpu_bus.id);
+                       sprintf(buffer, "CPU_BUS: %02x", dev->path.cpu_bus.id);
                        break;
                default:
                        printk_err("Unknown device path type: %d\n", dev->path.type);
@@ -227,29 +227,29 @@ int path_eq(struct device_path *path1, struct device_path *path2)
                        equal = 1;
                        break;
                case DEVICE_PATH_PCI:
-                       equal = (path1->u.pci.devfn == path2->u.pci.devfn);
+                       equal = (path1->pci.devfn == path2->pci.devfn);
                        break;
                case DEVICE_PATH_PNP:
-                       equal = (path1->u.pnp.port == path2->u.pnp.port) &&
-                               (path1->u.pnp.device == path2->u.pnp.device);
+                       equal = (path1->pnp.port == path2->pnp.port) &&
+                               (path1->pnp.device == path2->pnp.device);
                        break;
                case DEVICE_PATH_I2C:
-                       equal = (path1->u.i2c.device == path2->u.i2c.device);
+                       equal = (path1->i2c.device == path2->i2c.device);
                        break;
                case DEVICE_PATH_APIC:
-                       equal = (path1->u.apic.apic_id == path2->u.apic.apic_id);
+                       equal = (path1->apic.apic_id == path2->apic.apic_id);
                        break;
                case DEVICE_PATH_PCI_DOMAIN:
-                       equal = (path1->u.pci_domain.domain == path2->u.pci_domain.domain);
+                       equal = (path1->pci_domain.domain == path2->pci_domain.domain);
                        break;
                case DEVICE_PATH_APIC_CLUSTER:
-                       equal = (path1->u.apic_cluster.cluster == path2->u.apic_cluster.cluster);
+                       equal = (path1->apic_cluster.cluster == path2->apic_cluster.cluster);
                        break;
                case DEVICE_PATH_CPU:
-                       equal = (path1->u.cpu.id == path2->u.cpu.id);
+                       equal = (path1->cpu.id == path2->cpu.id);
                        break;
                case DEVICE_PATH_CPU_BUS:
-                       equal = (path1->u.cpu_bus.id == path2->u.cpu_bus.id);
+                       equal = (path1->cpu_bus.id == path2->cpu_bus.id);
                        break;
                default:
                        printk_err("Uknown device type: %d\n", path1->type);
index c0584354d2eb7874c12544ab722a88431956cab8..ebe5fc1df9137e7a1a4cedb894910c69d89d15df 100644 (file)
@@ -286,7 +286,7 @@ void run_bios(struct device * dev, unsigned long addr)
        int i;
        unsigned short initialcs = (addr & 0xF0000) >> 4;
        unsigned short initialip = (addr + 3) & 0xFFFF;
-       unsigned short devfn = dev->bus->secondary << 8 | dev->path.u.pci.devfn;
+       unsigned short devfn = dev->bus->secondary << 8 | dev->path.pci.devfn;
        X86EMU_intrFuncs intFuncs[256];
 
        X86EMU_setMemBase(0, 0x100000);
index 3d645f7359d295293ddb2968983fae4f7bb6950b..365eaca02baae98b4b72b8036ba4649811e6d40a 100644 (file)
@@ -27,7 +27,7 @@ int pcibios_handler(void)
                dev = dev_find_device(X86_DX, X86_CX, dev);
                if (dev != 0) {
                        X86_BH = dev->bus->secondary;
-                       X86_BL = dev->path.u.pci.devfn;
+                       X86_BL = dev->path.pci.devfn;
                        X86_AH = SUCCESSFUL;
                        X86_EFLAGS &= ~FB_CF;   /* clear carry flag */
                        ret = 1;
@@ -42,7 +42,7 @@ int pcibios_handler(void)
                dev = dev_find_class(X86_ECX, dev);
                if (dev != 0) {
                        X86_BH = dev->bus->secondary;
-                       X86_BL = dev->path.u.pci.devfn;
+                       X86_BL = dev->path.pci.devfn;
                        X86_AH = SUCCESSFUL;
                        X86_EFLAGS &= ~FB_CF;   /* clear carry flag */
                        ret = 1;
index 145829774af5d8da45c39ef6acd7ec9ad2b2066c..81706166aa30b849f225129b12e2cea1395725cf 100644 (file)
@@ -56,7 +56,7 @@ static device_t ht_scan_get_devs(device_t *old_devices)
         */
        while(last && last->sibling && 
                (last->sibling->path.type == DEVICE_PATH_PCI) &&
-               (last->sibling->path.u.pci.devfn > last->path.u.pci.devfn)) 
+               (last->sibling->path.pci.devfn > last->path.pci.devfn)) 
        {
                last = last->sibling;
        }
@@ -338,7 +338,7 @@ static void ht_collapse_early_enumeration(struct bus *bus, unsigned offset_uniti
                 uint32_t id;
                 dummy.bus              = bus;
                 dummy.path.type        = DEVICE_PATH_PCI;
-                dummy.path.u.pci.devfn = PCI_DEVFN(0, 0);
+                dummy.path.pci.devfn = PCI_DEVFN(0, 0);
                 id = pci_read_config32(&dummy, PCI_VENDOR_ID);
                 if ( ! ( (id == 0xffffffff) || (id == 0x00000000) ||
                     (id == 0x0000ffff) || (id == 0xffff0000) ) ) {
@@ -355,7 +355,7 @@ static void ht_collapse_early_enumeration(struct bus *bus, unsigned offset_uniti
                unsigned pos, flags;
                dummy.bus              = bus;
                dummy.path.type        = DEVICE_PATH_PCI;
-               dummy.path.u.pci.devfn = devfn;
+               dummy.path.pci.devfn = devfn;
                id = pci_read_config32(&dummy, PCI_VENDOR_ID);
                if (    (id == 0xffffffff) || (id == 0x00000000) || 
                        (id == 0x0000ffff) || (id == 0xffff0000)) {
@@ -503,9 +503,9 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
                /* Update the Unitd id in the device structure */
                static_count = 1;
                for(func = dev; func; func = func->sibling) {
-                       func->path.u.pci.devfn += (next_unitid << 3);
-                       static_count = (func->path.u.pci.devfn >> 3) 
-                               - (dev->path.u.pci.devfn >> 3) + 1;
+                       func->path.pci.devfn += (next_unitid << 3);
+                       static_count = (func->path.pci.devfn >> 3) 
+                               - (dev->path.pci.devfn >> 3) + 1;
                        last_func = func;
                }
                /* Compute the number of unitids consumed */
@@ -561,7 +561,7 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
                 pci_write_config16(real_last_dev, real_last_pos + PCI_CAP_FLAGS, flags);
 
                 for(func = real_last_dev; func; func = func->sibling) {
-                        func->path.u.pci.devfn -= ((real_last_unitid - HT_CHAIN_END_UNITID_BASE) << 3);
+                        func->path.pci.devfn -= ((real_last_unitid - HT_CHAIN_END_UNITID_BASE) << 3);
                        last_func = func;
                 }
 
index 396d4f3a317b3a5077941e7c13615ffb9aedc5b8..d67f3d9d003973f988f5bec68d276dca1cb02cd9 100644 (file)
@@ -868,7 +868,7 @@ static struct device *pci_scan_get_dev(struct device **list, unsigned int devfn)
                                dev_path(*list));
                        continue;
                }
-               if ((*list)->path.u.pci.devfn == devfn) {
+               if ((*list)->path.pci.devfn == devfn) {
                        /* Unlink from the list */
                        dev = *list;
                        *list = (*list)->sibling;
@@ -919,7 +919,7 @@ device_t pci_probe_dev(device_t dev, struct bus *bus, unsigned devfn)
                struct device dummy;
                dummy.bus              = bus;
                dummy.path.type        = DEVICE_PATH_PCI;
-               dummy.path.u.pci.devfn = devfn;
+               dummy.path.pci.devfn = devfn;
                id = pci_read_config32(&dummy, PCI_VENDOR_ID);
                /* Have we found somthing?
                 * Some broken boards return 0 if a slot is empty.
index 032c900cb9e702e5a416b02263abf996ab9ad11d..a8f09e229d0619004f75ce23bf1a045e7667e2f4 100644 (file)
@@ -41,35 +41,35 @@ static struct bus *get_pbus(device_t dev)
 uint8_t pci_read_config8(device_t dev, unsigned where)
 {
        struct bus *pbus = get_pbus(dev);
-       return ops_pci_bus(pbus)->read8(pbus, dev->bus->secondary, dev->path.u.pci.devfn, where);
+       return ops_pci_bus(pbus)->read8(pbus, dev->bus->secondary, dev->path.pci.devfn, where);
 }
 
 uint16_t pci_read_config16(device_t dev, unsigned where)
 {
        struct bus *pbus = get_pbus(dev);
-       return ops_pci_bus(pbus)->read16(pbus, dev->bus->secondary, dev->path.u.pci.devfn, where);
+       return ops_pci_bus(pbus)->read16(pbus, dev->bus->secondary, dev->path.pci.devfn, where);
 }
 
 uint32_t pci_read_config32(device_t dev, unsigned where)
 {
        struct bus *pbus = get_pbus(dev);
-       return ops_pci_bus(pbus)->read32(pbus, dev->bus->secondary, dev->path.u.pci.devfn, where);
+       return ops_pci_bus(pbus)->read32(pbus, dev->bus->secondary, dev->path.pci.devfn, where);
 }
 
 void pci_write_config8(device_t dev, unsigned where, uint8_t val)
 {
        struct bus *pbus = get_pbus(dev);
-       ops_pci_bus(pbus)->write8(pbus, dev->bus->secondary, dev->path.u.pci.devfn, where, val);
+       ops_pci_bus(pbus)->write8(pbus, dev->bus->secondary, dev->path.pci.devfn, where, val);
 }
 
 void pci_write_config16(device_t dev, unsigned where, uint16_t val)
 {
        struct bus *pbus = get_pbus(dev);
-       ops_pci_bus(pbus)->write16(pbus, dev->bus->secondary, dev->path.u.pci.devfn, where, val);
+       ops_pci_bus(pbus)->write16(pbus, dev->bus->secondary, dev->path.pci.devfn, where, val);
 }
 
 void pci_write_config32(device_t dev, unsigned where, uint32_t val)
 {
        struct bus *pbus = get_pbus(dev);
-       ops_pci_bus(pbus)->write32(pbus, dev->bus->secondary, dev->path.u.pci.devfn, where, val);
+       ops_pci_bus(pbus)->write32(pbus, dev->bus->secondary, dev->path.pci.devfn, where, val);
 }
index 862e0a9abe2de91ad9d663f5de6d144edb07fd3f..909026a36500180d1bb2af9434917ede6262a97e 100644 (file)
@@ -45,8 +45,8 @@ unsigned int pciexp_scan_bus(struct bus *bus,
        device_t child;
        max = pci_scan_bus(bus, min_devfn, max_devfn, max);
        for(child = bus->children; child; child = child->sibling) {
-               if (    (child->path.u.pci.devfn < min_devfn) ||
-                       (child->path.u.pci.devfn > max_devfn))
+               if (    (child->path.pci.devfn < min_devfn) ||
+                       (child->path.pci.devfn > max_devfn))
                {
                        continue;
                }
index 270d255b1eca09982d7c11ced96b614b8cfd9f4c..a1788920f9181e8802584c0bf89789d9fcf875c4 100644 (file)
@@ -67,8 +67,8 @@ unsigned int pcix_scan_bus(struct bus *bus,
        device_t child;
        max = pci_scan_bus(bus, min_devfn, max_devfn, max);
        for(child = bus->children; child; child = child->sibling) {
-               if (    (child->path.u.pci.devfn < min_devfn) ||
-                       (child->path.u.pci.devfn > max_devfn))
+               if (    (child->path.pci.devfn < min_devfn) ||
+                       (child->path.pci.devfn > max_devfn))
                {
                        continue;
                }
index 8b5acecfcf766f0aa30496f17e3b69d17febb70f..403fa6afe95ad7dfb439feabac0595816e70fc84 100644 (file)
 
 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 */
index 49d442af1f0f5a0feb6519a9098b9554143f4be9..7f17c9598c45bcbd6e511530336eff3406c76228 100644 (file)
@@ -234,7 +234,7 @@ static void debug_init(device_t dev)
 #endif
        if (!dev->enabled)
                return;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
 #if CONFIG_CHIP_NAME
        case 0:
                parent = dev->bus->dev;
index 8b923c18fdda6ed878c5b988e2cdf9c31e19dddb..63e95380c440d3a91565a165a32fdd22b0cdd279 100644 (file)
@@ -69,7 +69,7 @@ struct device_path {
                struct apic_cluster_path apic_cluster;
                struct cpu_path          cpu;
                struct cpu_bus_path      cpu_bus;
-       } u;
+       };
 };
 
 
index ce206b951ec1ef50070c8297218bad785c8c8287..b60fb80b0ccb272c49695eb3c8933f82f81b7ded 100644 (file)
@@ -105,24 +105,24 @@ static void get_ide_dma66()
 
        byte =
            pci_cf8_conf1.read8(&pbus, sm_dev->bus->secondary,
-                               sm_dev->path.u.pci.devfn, 0xA9);
+                               sm_dev->path.pci.devfn, 0xA9);
        byte |= (1 << 5);       /* Set Gpio9 as input */
        pci_cf8_conf1.write8(&pbus, sm_dev->bus->secondary,
-                            sm_dev->path.u.pci.devfn, 0xA9, byte);
+                            sm_dev->path.pci.devfn, 0xA9, byte);
 
        ide_dev = dev_find_slot(0, PCI_DEVFN(0x14, 1));
        byte =
            pci_cf8_conf1.read8(&pbus, ide_dev->bus->secondary,
-                               ide_dev->path.u.pci.devfn, 0x56);
+                               ide_dev->path.pci.devfn, 0x56);
        byte &= ~(7 << 0);
        if ((1 << 5) & pci_cf8_conf1.
-           read8(&pbus, sm_dev->bus->secondary, sm_dev->path.u.pci.devfn,
+           read8(&pbus, sm_dev->bus->secondary, sm_dev->path.pci.devfn,
                  0xAA))
                byte |= 2 << 0; /* mode 2 */
        else
                byte |= 5 << 0; /* mode 5 */
        pci_cf8_conf1.write8(&pbus, ide_dev->bus->secondary,
-                            ide_dev->path.u.pci.devfn, 0x56, byte);
+                            ide_dev->path.pci.devfn, 0x56, byte);
 }
 
 /*
@@ -158,10 +158,10 @@ static void set_thermal_config()
        sm_dev = dev_find_slot(0, PCI_DEVFN(0x14, 0));
        word =
            pci_cf8_conf1.read16(&pbus, sm_dev->bus->secondary,
-                                sm_dev->path.u.pci.devfn, 0x56);
+                                sm_dev->path.pci.devfn, 0x56);
        word |= 1 << 7;
        pci_cf8_conf1.write16(&pbus, sm_dev->bus->secondary,
-                             sm_dev->path.u.pci.devfn, 0x56, word);
+                             sm_dev->path.pci.devfn, 0x56, word);
 
        /* set GPIO 64 internal pull-up */
        byte = pm2_ioread(0xf0);
index 960c74954d482cc542304fb497092828fdda0886..7651180127fba410f2da9df389a10e115b5249a7 100644 (file)
@@ -169,26 +169,26 @@ static void set_thermal_config()
        sm_dev = dev_find_slot(0, PCI_DEVFN(0x14, 0));
        dword =
            pci_cf8_conf1.read32(&pbus, sm_dev->bus->secondary,
-                                sm_dev->path.u.pci.devfn, 0x64);
+                                sm_dev->path.pci.devfn, 0x64);
        dword |= 1 << 19;
        pci_cf8_conf1.write32(&pbus, sm_dev->bus->secondary,
-                             sm_dev->path.u.pci.devfn, 0x64, dword);
+                             sm_dev->path.pci.devfn, 0x64, dword);
 
        /* Enable Client Management Index/Data registers */
        dword =
            pci_cf8_conf1.read32(&pbus, sm_dev->bus->secondary,
-                                sm_dev->path.u.pci.devfn, 0x78);
+                                sm_dev->path.pci.devfn, 0x78);
        dword |= 1 << 11;       /* Cms_enable */
        pci_cf8_conf1.write32(&pbus, sm_dev->bus->secondary,
-                             sm_dev->path.u.pci.devfn, 0x78, dword);
+                             sm_dev->path.pci.devfn, 0x78, dword);
 
        /* MiscfuncEnable */
        byte =
            pci_cf8_conf1.read8(&pbus, sm_dev->bus->secondary,
-                               sm_dev->path.u.pci.devfn, 0x41);
+                               sm_dev->path.pci.devfn, 0x41);
        byte |= (1 << 5);
        pci_cf8_conf1.write8(&pbus, sm_dev->bus->secondary,
-                            sm_dev->path.u.pci.devfn, 0x41, byte);
+                            sm_dev->path.pci.devfn, 0x41, byte);
 
        /* set GPM5 as input */
        /* set index register 0C50h to 13h (miscellaneous control) */
@@ -230,10 +230,10 @@ static void set_thermal_config()
        /* set GPIO 64 to input */
        word =
            pci_cf8_conf1.read16(&pbus, sm_dev->bus->secondary,
-                                sm_dev->path.u.pci.devfn, 0x56);
+                                sm_dev->path.pci.devfn, 0x56);
        word |= 1 << 7;
        pci_cf8_conf1.write16(&pbus, sm_dev->bus->secondary,
-                             sm_dev->path.u.pci.devfn, 0x56, word);
+                             sm_dev->path.pci.devfn, 0x56, word);
 
        /* set GPIO 64 internal pull-up */
        byte = pm2_ioread(0xf0);
index 30b4051c4b8af6bfb634741e19e5a4bae5c9335e..79c241fadbf0053db1e70487291d516ef538e7ad 100644 (file)
@@ -45,12 +45,12 @@ void smp_write_processors_inorder(struct mp_config_table *mc)
                         continue;
                 }
                 cpu_flag = MPC_CPU_ENABLED;
-                if (boot_apic_id == cpu->path.u.apic.apic_id) {
+                if (boot_apic_id == cpu->path.apic.apic_id) {
                         cpu_flag = MPC_CPU_ENABLED | MPC_CPU_BOOTPROCESSOR;
                 }
-               if(cpu->path.u.apic.apic_id == order_id) {
+               if(cpu->path.apic.apic_id == order_id) {
                     smp_write_processor(mc,
-                        cpu->path.u.apic.apic_id, apic_version,
+                        cpu->path.apic.apic_id, apic_version,
                         cpu_flag, cpu_features, cpu_feature_flags);
                    break;
                }
@@ -100,8 +100,8 @@ unsigned max_apicid(void)
        for(dev = all_devices; dev; dev = dev->next) {
                if (dev->path.type != DEVICE_PATH_APIC)
                        continue;
-               if (dev->path.u.apic.apic_id > max_apicid) {
-                       max_apicid = dev->path.u.apic.apic_id;
+               if (dev->path.apic.apic_id > max_apicid) {
+                       max_apicid = dev->path.apic.apic_id;
                }
        }
        return max_apicid;
index ac9c1bdf02549177ce8242317fac974fecc27fda..183489cbac077670538ec3247cf24284b2ee3d60 100644 (file)
@@ -297,7 +297,7 @@ void do_vgabios(device_t dev)
                // check signature again
                buf = (unsigned char *) 0xc0000;
                if (buf[0]==0x55 && buf[1]==0xAA) {
-                       busdevfn = (dev->bus->secondary << 8) | dev->path.u.pci.devfn;
+                       busdevfn = (dev->bus->secondary << 8) | dev->path.pci.devfn;
                        printk_debug("bus/devfn = %#x\n", busdevfn);
 
                        real_mode_switch_call_vga(busdevfn);
@@ -725,7 +725,7 @@ pcibios_vga(unsigned long *pedi, unsigned long *pesi, unsigned long *pebp,
                        // busnum is an unsigned char;
                        // devfn is an int, so we mask it off. 
                        busdevfn = (dev->bus->secondary << 8)
-                               | (dev->path.u.pci.devfn & 0xff);
+                               | (dev->path.pci.devfn & 0xff);
                        printk_debug("0x%x: return 0x%x\n", func, busdevfn);
                        *pebx = busdevfn;
                        retval = 0;
index 7f42f0ab12cf137944a1b74267a1c22bfe3bb179..6daa22666d7dccc4c4a0908a52df261098ce1476 100644 (file)
@@ -368,7 +368,7 @@ void do_vgabios(void)
                // check signature again
                buf = (unsigned char *) 0xc0000;
                if (buf[0]==0x55 && buf[1]==0xAA) {
-                       busdevfn = (dev->bus->secondary << 8) | dev->path.u.pci.devfn;
+                       busdevfn = (dev->bus->secondary << 8) | dev->path.pci.devfn;
                        printk_debug("bus/devfn = %#x\n", busdevfn);
 
                        real_mode_switch_call_vga(busdevfn);
@@ -725,7 +725,7 @@ pcibios(unsigned long *pedi, unsigned long *pesi, unsigned long *pebp,
                        // busnum is an unsigned char;
                        // devfn is an int, so we mask it off. 
                        busdevfn = (dev->bus->secondary << 8)
-                               | (dev->path.u.pci.devfn & 0xff);
+                               | (dev->path.pci.devfn & 0xff);
                        printk_debug("0x%x: return 0x%x\n", func, busdevfn);
                        *pebx = busdevfn;
                        retval = 0;
index a0ad48b6fe5c554a564d807aff4e63074c77ae73..79c68b7dbb172b176142567b55b3789ffabf101c 100644 (file)
@@ -45,7 +45,7 @@ static void adt7463_init(device_t dev)
 
        /* Find the ADT7463 device. */
        path.type = DEVICE_PATH_I2C;
-       path.u.i2c.device = 0x2d;
+       path.i2c.device = 0x2d;
        adt7463 = find_dev_path(smbus_dev->link, &path);
        if (!adt7463)
                die("ADT7463 not found\n");
@@ -137,8 +137,8 @@ static unsigned int scan_root_bus(device_t root, unsigned int max)
        root->links++;
 
        path.type = DEVICE_PATH_PNP;
-       path.u.pnp.port = 0;
-       path.u.pnp.device = 0;
+       path.pnp.port = 0;
+       path.pnp.device = 0;
        dummy = alloc_dev(&root->link[link_i], &path);
        dummy->ops = &dummy_operations;
 
index 6d588a7021a21a4b2ed68247d33736fe7eaf663f..5e19a2776782e7c805096f4beb6a273423fc2553 100644 (file)
@@ -369,7 +369,7 @@ void do_vgabios(void)
                // check signature again
                buf = (unsigned char *) 0xc0000;
                if (buf[0]==0x55 && buf[1]==0xAA) {
-                       busdevfn = (dev->bus->secondary << 8) | dev->path.u.pci.devfn;
+                       busdevfn = (dev->bus->secondary << 8) | dev->path.pci.devfn;
                        printk_debug("bus/devfn = %#x\n", busdevfn);
 
                        real_mode_switch_call_vga(busdevfn);
@@ -726,7 +726,7 @@ pcibios(unsigned long *pedi, unsigned long *pesi, unsigned long *pebp,
                        // busnum is an unsigned char;
                        // devfn is an int, so we mask it off. 
                        busdevfn = (dev->bus->secondary << 8)
-                               | (dev->path.u.pci.devfn & 0xff);
+                               | (dev->path.pci.devfn & 0xff);
                        printk_debug("0x%x: return 0x%x\n", func, busdevfn);
                        *pebx = busdevfn;
                        retval = 0;
index b33ea488cf4a5edaea6c56f1e68e4ec2c1b8daec..52c438e7dd07f4117d3b7f3a1e478515b875dd1d 100644 (file)
@@ -41,7 +41,7 @@ unsigned long acpi_create_madt_lapics(unsigned long current)
                if (!cpu->enabled) {
                        continue;
                }
-               current += acpi_create_madt_lapic((acpi_madt_lapic_t *)current, cpu_index, cpu->path.u.apic.apic_id);
+               current += acpi_create_madt_lapic((acpi_madt_lapic_t *)current, cpu_index, cpu->path.apic.apic_id);
                cpu_index++;
        }
        return current;
@@ -79,8 +79,8 @@ unsigned long acpi_create_srat_lapics(unsigned long current)
                if (!cpu->enabled) {
                        continue;
                }
-               printk_debug("SRAT: lapic cpu_index=%02x, node_id=%02x, apic_id=%02x\n", cpu_index, cpu->path.u.apic.node_id, cpu->path.u.apic.apic_id);
-               current += acpi_create_srat_lapic((acpi_srat_lapic_t *)current, cpu->path.u.apic.node_id, cpu->path.u.apic.apic_id);
+               printk_debug("SRAT: lapic cpu_index=%02x, node_id=%02x, apic_id=%02x\n", cpu_index, cpu->path.apic.node_id, cpu->path.apic.apic_id);
+               current += acpi_create_srat_lapic((acpi_srat_lapic_t *)current, cpu->path.apic.node_id, cpu->path.apic.apic_id);
                cpu_index++;
        }
        return current;
@@ -357,13 +357,13 @@ unsigned long acpi_add_ssdt_pstates(acpi_rsdt_t *rsdt, unsigned long current)
                if (!cpu->enabled) {
                         continue;
                }
-               printk_debug("ACPI: pstate cpu_index=%02x, node_id=%02x, core_id=%02x\n", cpu_index, cpu->path.u.apic.node_id, cpu->path.u.apic.core_id);
+               printk_debug("ACPI: pstate cpu_index=%02x, node_id=%02x, core_id=%02x\n", cpu_index, cpu->path.apic.node_id, cpu->path.apic.core_id);
 
                current   = ( current + 0x0f) & -0x10;
                ssdt = (acpi_header_t *)current;
                current += ((acpi_header_t *)AmlCode_sspr)->length;
                memcpy((void *)ssdt, (void *)AmlCode_sspr, ((acpi_header_t *)AmlCode_sspr)->length);
-               update_sspr((void*)ssdt,cpu->path.u.apic.node_id, cpu_index);
+               update_sspr((void*)ssdt,cpu->path.apic.node_id, cpu_index);
                /* recalculate checksum */
                ssdt->checksum = 0;
                ssdt->checksum = acpi_checksum((unsigned char *)ssdt,ssdt->length);
index 5fcee31cc82b86fe497a0ef5a11a3a51a48d890e..634fec53ce3d5fc217008258eb2aa6b47b161667 100644 (file)
@@ -59,7 +59,7 @@ static void mcf3_read_resources(device_t dev)
        pci_dev_read_resources(dev);
 
        /* If we are not the first processor don't allocate the gart apeture */
-       if (dev->path.u.pci.devfn != PCI_DEVFN(CDB, 3)) {
+       if (dev->path.pci.devfn != PCI_DEVFN(CDB, 3)) {
                return;
        }
 
index e335ea7f1fb46a4e9f8efb5367ce04a288790375..38b152c8e86e91c880be99c084cec5397278a5bb 100644 (file)
@@ -114,13 +114,13 @@ static u32 amdfam10_nodeid(device_t dev)
        unsigned busn;
        busn = dev->bus->secondary;
        if(busn != CBB) {
-               return (dev->path.u.pci.devfn >> 3) - CDB + 32;
+               return (dev->path.pci.devfn >> 3) - CDB + 32;
        } else {
-               return (dev->path.u.pci.devfn >> 3) - CDB;
+               return (dev->path.pci.devfn >> 3) - CDB;
        }
 
 #else
-       return (dev->path.u.pci.devfn >> 3) - CDB;
+       return (dev->path.pci.devfn >> 3) - CDB;
 #endif
 }
 
@@ -1289,7 +1289,7 @@ static u32 cpu_bus_scan(device_t dev, u32 max)
                                        printk_debug("%s\n",dev_path(dev_mc));
                                        while(dev_mc){
                                                printk_debug("%s move to ",dev_path(dev_mc));
-                                               dev_mc->path.u.pci.devfn -= PCI_DEVFN(0x18,0);
+                                               dev_mc->path.pci.devfn -= PCI_DEVFN(0x18,0);
                                                printk_debug("%s\n",dev_path(dev_mc));
                                                dev_mc = dev_mc->sibling;
                                        }
@@ -1395,7 +1395,7 @@ static u32 cpu_bus_scan(device_t dev, u32 max)
 
                        /* Build the cpu device path */
                        cpu_path.type = DEVICE_PATH_APIC;
-                       cpu_path.u.apic.apic_id = i * (nb_cfg_54?(siblings+1):1) + j * (nb_cfg_54?1:64); // ?
+                       cpu_path.apic.apic_id = i * (nb_cfg_54?(siblings+1):1) + j * (nb_cfg_54?1:64); // ?
 
                        /* See if I can find the cpu */
                        cpu = find_dev_path(cpu_bus, &cpu_path);
@@ -1417,16 +1417,16 @@ static u32 cpu_bus_scan(device_t dev, u32 max)
 
                        /* Report what I have done */
                        if (cpu) {
-                               cpu->path.u.apic.node_id = i;
-                               cpu->path.u.apic.core_id = j;
+                               cpu->path.apic.node_id = i;
+                               cpu->path.apic.core_id = j;
        #if (ENABLE_APIC_EXT_ID == 1) && (APIC_ID_OFFSET>0)
                                 if(sysconf.enabled_apic_ext_id) {
                                        if(sysconf.lift_bsp_apicid) {
-                                               cpu->path.u.apic.apic_id += sysconf.apicid_offset;
+                                               cpu->path.apic.apic_id += sysconf.apicid_offset;
                                        } else
                                        {
-                                               if (cpu->path.u.apic.apic_id != 0)
-                                                       cpu->path.u.apic.apic_id += sysconf.apicid_offset;
+                                               if (cpu->path.apic.apic_id != 0)
+                                                       cpu->path.apic.apic_id += sysconf.apicid_offset;
                                         }
                                }
        #endif
index ca71c379d78091768d7fe8704689bc412a7ebdb9..d3ab9d73d047dd84127742f64bedf1889e7f3121 100644 (file)
@@ -60,7 +60,7 @@ unsigned long acpi_create_madt_lapics(unsigned long current)
                if (!cpu->enabled) {
                        continue;
                }
-               current += acpi_create_madt_lapic((acpi_madt_lapic_t *)current, cpu_index, cpu->path.u.apic.apic_id);
+               current += acpi_create_madt_lapic((acpi_madt_lapic_t *)current, cpu_index, cpu->path.apic.apic_id);
                cpu_index++;
        }
        return current;
@@ -98,8 +98,8 @@ unsigned long acpi_create_srat_lapics(unsigned long current)
                if (!cpu->enabled) {
                        continue;
                }
-               printk_debug("SRAT: lapic cpu_index=%02x, node_id=%02x, apic_id=%02x\n", cpu_index, cpu->path.u.apic.node_id, cpu->path.u.apic.apic_id);
-               current += acpi_create_srat_lapic((acpi_srat_lapic_t *)current, cpu->path.u.apic.node_id, cpu->path.u.apic.apic_id);
+               printk_debug("SRAT: lapic cpu_index=%02x, node_id=%02x, apic_id=%02x\n", cpu_index, cpu->path.apic.node_id, cpu->path.apic.apic_id);
+               current += acpi_create_srat_lapic((acpi_srat_lapic_t *)current, cpu->path.apic.node_id, cpu->path.apic.apic_id);
                cpu_index++;
        }
        return current;
index 56a806982d14bf57701be868d9c1846c6551791e..03758c63bacf541607640375132b4207d1f94e97 100644 (file)
@@ -43,7 +43,7 @@ static void mcf3_read_resources(device_t dev)
        pci_dev_read_resources(dev);
 
        /* If we are not the first processor don't allocate the gart apeture */
-       if (dev->path.u.pci.devfn != PCI_DEVFN(0x18, 3)) {
+       if (dev->path.pci.devfn != PCI_DEVFN(0x18, 3)) {
                return;
        }
 
@@ -162,7 +162,7 @@ static void misc_control_init(struct device *dev)
        }
        else if(is_cpu_pre_d0()) {
                uint32_t dcl;
-               f2_dev = dev_find_slot(0, dev->path.u.pci.devfn - 3 + 2);
+               f2_dev = dev_find_slot(0, dev->path.pci.devfn - 3 + 2);
                /* Errata 98 
                 * Set Clk Ramp Hystersis to 7
                 * Clock Power/Timing Low
@@ -180,7 +180,7 @@ static void misc_control_init(struct device *dev)
        }
 #endif
        /* Optimize the Link read pointers */
-       f0_dev = dev_find_slot(0, dev->path.u.pci.devfn - 3);
+       f0_dev = dev_find_slot(0, dev->path.pci.devfn - 3);
        if (f0_dev) {
                int link;
                cmd_ref = cmd = pci_read_config32(dev, 0xdc);
index 2c7c9813c2c2c60ac40eafba50b95284208c69ad..0c92037b46cd10b2b5befe063f0f7855d8cdddaf 100644 (file)
@@ -98,7 +98,7 @@ static void f1_write_config32(unsigned reg, uint32_t value)
 
 static unsigned int amdk8_nodeid(device_t dev)
 {
-       return (dev->path.u.pci.devfn >> 3) - 0x18;
+       return (dev->path.pci.devfn >> 3) - 0x18;
 }
 
 static unsigned int amdk8_scan_chain(device_t dev, unsigned nodeid, unsigned link, unsigned sblink, unsigned int max, unsigned offset_unitid)
@@ -1277,7 +1277,7 @@ static unsigned int cpu_bus_scan(device_t dev, unsigned int max)
 
                        /* Build the cpu device path */
                        cpu_path.type = DEVICE_PATH_APIC;
-                       cpu_path.u.apic.apic_id = i * (nb_cfg_54?(siblings+1):1) + j * (nb_cfg_54?1:8);
+                       cpu_path.apic.apic_id = i * (nb_cfg_54?(siblings+1):1) + j * (nb_cfg_54?1:8);
 
                        /* See if I can find the cpu */
                        cpu = find_dev_path(cpu_bus, &cpu_path);
@@ -1299,15 +1299,15 @@ static unsigned int cpu_bus_scan(device_t dev, unsigned int max)
 
                        /* Report what I have done */
                        if (cpu) {
-                               cpu->path.u.apic.node_id = i;
-                               cpu->path.u.apic.core_id = j;
+                               cpu->path.apic.node_id = i;
+                               cpu->path.apic.core_id = j;
                                if(sysconf.enabled_apic_ext_id) {
                                        if(sysconf.lift_bsp_apicid) {
-                                               cpu->path.u.apic.apic_id += sysconf.apicid_offset;
+                                               cpu->path.apic.apic_id += sysconf.apicid_offset;
                                        } else
                                        {
-                                              if (cpu->path.u.apic.apic_id != 0)
-                                                      cpu->path.u.apic.apic_id += sysconf.apicid_offset;
+                                              if (cpu->path.apic.apic_id != 0)
+                                                      cpu->path.apic.apic_id += sysconf.apicid_offset;
                                        }
                                }
                                printk_debug("CPU: %s %s\n",
index 5a705c2652f1c1e1678dc3d5e8c86713dd20bba9..14730803766ecb09176c992bc6af4cc7bc2bcb7c 100644 (file)
@@ -369,7 +369,7 @@ void do_vgabios(void)
                // check signature again
                buf = (unsigned char *) 0xc0000;
                if (buf[0]==0x55 && buf[1]==0xAA) {
-                       busdevfn = (dev->bus->secondary << 8) | dev->path.u.pci.devfn;
+                       busdevfn = (dev->bus->secondary << 8) | dev->path.pci.devfn;
                        printk_debug("bus/devfn = %#x\n", busdevfn);
 
                        real_mode_switch_call_vga(busdevfn);
@@ -726,7 +726,7 @@ pcibios(unsigned long *pedi, unsigned long *pesi, unsigned long *pebp,
                        // busnum is an unsigned char;
                        // devfn is an int, so we mask it off. 
                        busdevfn = (dev->bus->secondary << 8)
-                               | (dev->path.u.pci.devfn & 0xff);
+                               | (dev->path.pci.devfn & 0xff);
                        printk_debug("0x%x: return 0x%x\n", func, busdevfn);
                        *pebx = busdevfn;
                        retval = 0;
index d5536c4fc1b17e307b3e359b83051462a8e4f2c9..1390065c094a0f1fa868bc0e4f12b7c23abaef7c 100644 (file)
@@ -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;
index 7d18b00f0c2e0a3cd6944fbd41ee4fa5f6639450..57c26910f869b64b6cca59321717fd142b3dbb77 100644 (file)
@@ -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);
index 6064219acbaa9219993bdb75daff2329473f5825..9d8507766807f0431f087cbd6cdd52c9ceaa3ee3 100644 (file)
@@ -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++;
index f06ef24280c2f2e206781a1d4366499fb07ac39a..12ef26c171b4df3d2310b9c42056909e79465052 100644 (file)
@@ -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);
        }
 }
 
index 3caa00e9c8cac3c460be82a5e5ca84933f53123f..e5d6a1e2e7ca097134a007f10c562a2198944925 100644 (file)
@@ -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");
index 302664f3c9c47ca7d06dd67bb44a4e3ee7c7f13a..7b6d8fed8fdc374e2b86026f92854201035a898f 100644 (file)
@@ -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;
index ef941ddb010b7b2b55e48b1f7bc613ee779f6ead..1e34786b77d8e6e030c24f2c9f4a0941d249afe3 100644 (file)
@@ -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);
index d6643ab91b2344dd712793d88fbbfb4008c362c6..a107d2dfd10e18b5b1959bc07b99f8cff4f6ce7f 100644 (file)
@@ -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);
index a1d3eaa8d101a7bc20dd270a89fd157386410a50..7eb4e607c7ec407dd86cebd9dd232fa03c898625 100644 (file)
@@ -21,21 +21,21 @@ void bcm5785_enable(device_t dev)
                (bus_dev->device == 0x0036 )) // device under PCI-X Bridge
        {
                unsigned devfn;
-               devfn = bus_dev->path.u.pci.devfn + (1 << 3);
+               devfn = bus_dev->path.pci.devfn + (1 << 3);
                sb_pci_main_dev = dev_find_slot(bus_dev->bus->secondary, devfn);
-//             index = ((dev->path.u.pci.devfn & ~7) >> 3) + 8;
+//             index = ((dev->path.pci.devfn & ~7) >> 3) + 8;
        } else if ((bus_dev->vendor == PCI_VENDOR_ID_SERVERWORKS) &&
                 (bus_dev->device == 0x0104)) // device under PCI Bridge( under PCI-X )
         {
                 unsigned devfn;
-                devfn = bus_dev->bus->dev->path.u.pci.devfn + (1 << 3);
+                devfn = bus_dev->bus->dev->path.pci.devfn + (1 << 3);
                 sb_pci_main_dev = dev_find_slot(bus_dev->bus->dev->bus->secondary, devfn);
-//                index = ((dev->path.u.pci.devfn & ~7) >> 3) + 8;
+//                index = ((dev->path.pci.devfn & ~7) >> 3) + 8;
         }
        else { // same bus
                unsigned devfn;
                uint32_t id;
-               devfn = (dev->path.u.pci.devfn) & ~7;
+               devfn = (dev->path.pci.devfn) & ~7;
                if( dev->vendor == PCI_VENDOR_ID_SERVERWORKS ) { 
                        if(dev->device == 0x0036) //PCI-X Bridge
                        { devfn += (1<<3); }
@@ -43,7 +43,7 @@ void bcm5785_enable(device_t dev)
                        { devfn -= (1<<3); }
                }
                sb_pci_main_dev = dev_find_slot(dev->bus->secondary, devfn);
-//             index = dev->path.u.pci.devfn & 7;
+//             index = dev->path.pci.devfn & 7;
        }
        if (!sb_pci_main_dev) {
                return;
index 32b944bfdd5dacd514a0e58ef1b3232ca354ff2a..38cd6d4b3d24e61b15305e2424b0caf2ab7c045c 100644 (file)
@@ -25,7 +25,7 @@ static void sata_init(struct device *dev)
         volatile unsigned int *mmio_reg;
        int i;
 
-       if(!(dev->path.u.pci.devfn & 7)) { // only set it in Func0
+       if(!(dev->path.pci.devfn & 7)) { // only set it in Func0
                byte = pci_read_config8(dev, 0x78);
                byte |= (1<<7);
                pci_write_config8(dev, 0x78, byte);
index fcf035255af30c6a50047bcc2ee5def5e6c1d48c..8f186f8b178d4c71e28ade0d5ebcedd66b3e5da7 100644 (file)
@@ -71,7 +71,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, 0x90);
@@ -85,7 +85,7 @@ static int lsmbus_send_byte(device_t dev, uint8_t 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, 0x90);
@@ -98,7 +98,7 @@ static int lsmbus_read_byte(device_t dev, uint8_t 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, 0x90);
@@ -111,7 +111,7 @@ static int lsmbus_write_byte(device_t dev, uint8_t address, uint8_t 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, 0x90);
index 11110191f742f0c30b148601bc738e72480defbf..786daea23b562a2410a36bec92452415a071e207 100644 (file)
@@ -12,11 +12,11 @@ void esb6300_enable(device_t dev)
 
        /* See if we are on the behind the 6300 pci bridge */
        lpc_dev = dev_find_slot(dev->bus->secondary, PCI_DEVFN(0x1f, 0));
-       if((dev->path.u.pci.devfn &0xf8)== 0xf8) {
-               index = dev->path.u.pci.devfn & 7;
+       if((dev->path.pci.devfn &0xf8)== 0xf8) {
+               index = dev->path.pci.devfn & 7;
        }
-       else if((dev->path.u.pci.devfn &0xf8)== 0xe8) {
-               index = (dev->path.u.pci.devfn & 7) +8;
+       else if((dev->path.pci.devfn &0xf8)== 0xe8) {
+               index = (dev->path.pci.devfn & 7) +8;
        }
        if ((!lpc_dev) || (index >= 16) || ((1<<index)&0x3091)) {
                return;
index c202a3008e13853feebaf8e07e36f068e81888bc..3aa507070dfceae1af3ec9ceeae242a1fd25c0b6 100644 (file)
@@ -13,7 +13,7 @@ static int lsmbus_read_byte(struct bus *bus, 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(bus->dev, 0x20);
        
        return do_smbus_read_byte(res->base, device, address);
index 2d08b42d0d0362ecacc596f6772c1daaa24233f5..69ee7bd058fba8c0f7abe18888099b410c5dfc6c 100644 (file)
@@ -41,8 +41,8 @@ void i3100_enable(device_t dev)
        lpc_dev = dev_find_slot(0x0, PCI_DEVFN(0x1f, 0x0));
        pci_write_config32(lpc_dev, 0xf0, 0xa0000000 | (1 << 0));
        disable = (volatile u32 *) 0xa0003418;
-       func = PCI_FUNC(dev->path.u.pci.devfn);
-       switch (PCI_SLOT(dev->path.u.pci.devfn)) {
+       func = PCI_FUNC(dev->path.pci.devfn);
+       switch (PCI_SLOT(dev->path.pci.devfn)) {
        case 0x1f: /* LPC (fn0), SATA (fn2), SMBus (fn3) */
                *disable |= (1 << (func == 0x0 ? 14 : func));
                break;
index 5b24acdcf2909349f28a85dafa6b723b3e173695..14853d56bfc667d662d9c2bc90ce26090750b966 100644 (file)
@@ -34,7 +34,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, 0x20);
 
index f416e363d4528b4b61cacd7854d421f85c89ed90..23a64f7104a32ec30b1c4083d51b2e70c34422b3 100644 (file)
@@ -22,16 +22,16 @@ void i82801ca_enable(device_t dev)
        //               D31:F1, D31:F3, D31:F5, D31:F6, 
        //               D29:F0, D29:F1, D29:F2
 
-    if (PCI_SLOT(dev->path.u.pci.devfn) == 31) {
-       index = PCI_FUNC(dev->path.u.pci.devfn);
+    if (PCI_SLOT(dev->path.pci.devfn) == 31) {
+       index = PCI_FUNC(dev->path.pci.devfn);
 
                if ((index == 1) || (index == 3) || (index == 5) || (index == 6))
                        bHasDisableBit = 1;
 
-    } else if (PCI_SLOT(dev->path.u.pci.devfn) == 29) {
-       index = 8 + PCI_FUNC(dev->path.u.pci.devfn);
+    } else if (PCI_SLOT(dev->path.pci.devfn) == 29) {
+       index = 8 + PCI_FUNC(dev->path.pci.devfn);
 
-               if (PCI_FUNC(dev->path.u.pci.devfn) < 3)
+               if (PCI_FUNC(dev->path.pci.devfn) < 3)
                        bHasDisableBit = 1;
     }
 
index 160b897dc21ad6c0706e540b64466838f806ec3b..157ffcac1eb796d4762ed7bd4215cd8669f66769 100644 (file)
@@ -21,8 +21,8 @@ void i82801dbm_enable(device_t dev)
        //               D31: F0, F1, F3, F5, F6, 
        //               D29: F0, F1, F2, F7
 
-    if (PCI_SLOT(dev->path.u.pci.devfn) == 31) {
-       index = PCI_FUNC(dev->path.u.pci.devfn);
+    if (PCI_SLOT(dev->path.pci.devfn) == 31) {
+       index = PCI_FUNC(dev->path.pci.devfn);
 
                switch (index) {
                        case 0:
@@ -40,10 +40,10 @@ void i82801dbm_enable(device_t dev)
                if (index == 0)
                        index = 14;             // D31:F0 bit is an exception
 
-    } else if (PCI_SLOT(dev->path.u.pci.devfn) == 29) {
-       index = 8 + PCI_FUNC(dev->path.u.pci.devfn);
+    } else if (PCI_SLOT(dev->path.pci.devfn) == 29) {
+       index = 8 + PCI_FUNC(dev->path.pci.devfn);
 
-               if ((PCI_FUNC(dev->path.u.pci.devfn) < 3) || (PCI_FUNC(dev->path.u.pci.devfn) == 7))
+               if ((PCI_FUNC(dev->path.pci.devfn) < 3) || (PCI_FUNC(dev->path.pci.devfn) == 7))
                        bHasDisableBit = 1;
     }
 
index 6738a521046b12365cc549ca4797c317121eee7e..19b0666cdbffec2a09c634e48008d4f4b830bafe 100644 (file)
@@ -12,11 +12,11 @@ void i82801er_enable(device_t dev)
 
        /* See if we are behind the i82801er pci bridge */
        lpc_dev = dev_find_slot(dev->bus->secondary, PCI_DEVFN(0x1f, 0));
-       if((dev->path.u.pci.devfn &0xf8)== 0xf8) {
-               index = dev->path.u.pci.devfn & 7;
+       if((dev->path.pci.devfn &0xf8)== 0xf8) {
+               index = dev->path.pci.devfn & 7;
        }
-       else if((dev->path.u.pci.devfn &0xf8)== 0xe8) {
-               index = (dev->path.u.pci.devfn & 7) +8;
+       else if((dev->path.pci.devfn &0xf8)== 0xe8) {
+               index = (dev->path.pci.devfn & 7) +8;
        }
        if ((!lpc_dev) || (index >= 16) || ((1<<index)&0x3091)) {
                return;
index 23980c939a80ca0c65b8c97f03487e5a93006065..ee32c697a7966999c1b817d8e9a8ec0ad596ab1e 100644 (file)
@@ -13,7 +13,7 @@ static int lsmbus_read_byte(struct bus *bus, 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(bus->dev, 0x20);
        
        return do_smbus_read_byte(res->base, device, address);
index 45bc0164e029871fdd4894f49c95c53b1ae152fd..bc14cc39f207bad128a04b63004f82f833756456 100644 (file)
@@ -31,7 +31,7 @@ static int smbus_read_byte(struct bus *bus, device_t dev, u8 address)
        u16 device;
        struct resource *res;
 
-       device = dev->path.u.i2c.device;
+       device = dev->path.i2c.device;
        res = find_resource(bus->dev, 0x20);
 
        return do_smbus_read_byte(res->base, device, address);
index ec025fd921ce54eccf30b0facd999f05f03846a0..385b122d473dfd2d4f99a40581662065fbba0ee2 100644 (file)
@@ -40,10 +40,10 @@ void i82801xx_enable(device_t dev)
         * exists it can be disabled. Workarounds for ICH variants that don't
         * follow this should be done by checking the device ID.
         */
-       if (PCI_SLOT(dev->path.u.pci.devfn) == 31) {
-               index = PCI_FUNC(dev->path.u.pci.devfn);
-       } else if (PCI_SLOT(dev->path.u.pci.devfn) == 29) {
-               index = 8 + PCI_FUNC(dev->path.u.pci.devfn);
+       if (PCI_SLOT(dev->path.pci.devfn) == 31) {
+               index = PCI_FUNC(dev->path.pci.devfn);
+       } else if (PCI_SLOT(dev->path.pci.devfn) == 29) {
+               index = 8 + PCI_FUNC(dev->path.pci.devfn);
        }
 
        /* Function 0 is a bit of an exception. */
index af2a139456e611750bf934d0ceb325255bcb32b7..21731049494dd0d5c14ad90c4e508a752c5da3dd 100644 (file)
@@ -32,7 +32,7 @@ static int smbus_read_byte(struct bus *bus, device_t dev, u8 address)
        unsigned device;        /* TODO: u16? */
        struct resource *res;
 
-       device = dev->path.u.i2c.device;
+       device = dev->path.i2c.device;
        res = find_resource(bus->dev, 0x20);
 
        return do_smbus_read_byte(res->base, device, address);
index ce37d122e7e4a93cb8466c5268dbbb3ecb6ab1de..0fa74ffcf3ed624ccc63868ca829d62b61dda9f4 100644 (file)
@@ -63,8 +63,8 @@ static void p64h2_ioapic_init(device_t dev)
     pWindowRegister = (volatile uint32_t*)(memoryBase + 0x10);
 
     printk_debug("IOAPIC %d at %02x:%02x.%01x  MBAR = %x DataAddr = %x\n",
-                 apic_id, dev->bus->secondary, PCI_SLOT(dev->path.u.pci.devfn), 
-                 PCI_FUNC(dev->path.u.pci.devfn), pIndexRegister, pWindowRegister);
+                 apic_id, dev->bus->secondary, PCI_SLOT(dev->path.pci.devfn), 
+                 PCI_FUNC(dev->path.pci.devfn), pIndexRegister, pWindowRegister);
 
     apic_id <<= 24;             // Convert ID to bitmask
 
index d185159b433264d20ef8e5ae7842e46634484539..5913063606890a1c10e864c048cdd5aff785f21b 100644 (file)
@@ -15,11 +15,11 @@ static void pxhd_enable(device_t dev)
 {
        device_t bridge;
        uint16_t value;
-       if ((dev->path.u.pci.devfn & 1) == 0) {
+       if ((dev->path.pci.devfn & 1) == 0) {
                /* Can we enable/disable the bridges? */
                return;
        }
-       bridge = dev_find_slot(dev->bus->secondary, dev->path.u.pci.devfn & ~1);
+       bridge = dev_find_slot(dev->bus->secondary, dev->path.pci.devfn & ~1);
        if (!bridge) {
                printk_err("Cannot find bridge for ioapic: %s\n",
                           dev_path(dev));
index 209b15c26cbdab3fda095dc2060a435364a5ba77..4adf81930485185d5e887ef8f26ea8a5d0ba77fc 100644 (file)
@@ -61,7 +61,7 @@ void ck804_enable(device_t dev)
                deviceid = dev->device;
        }
 
-       devfn = (dev->path.u.pci.devfn) & ~7;
+       devfn = (dev->path.pci.devfn) & ~7;
        switch (deviceid) {
        case PCI_DEVICE_ID_NVIDIA_CK804_SM:
                index = 16;
index 52d1fd5826318df58dd387b83077689e81c50256..3d8c9cee77ddc551710045f40cd1e27854e9fbec 100644 (file)
@@ -20,7 +20,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, 0x20 + (pbus->link * 4));
@@ -34,7 +34,7 @@ static int lsmbus_send_byte(device_t dev, uint8_t 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, 0x20 + (pbus->link * 4));
@@ -48,7 +48,7 @@ static int lsmbus_read_byte(device_t dev, uint8_t 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, 0x20 + (pbus->link * 4));
@@ -62,7 +62,7 @@ static int lsmbus_write_byte(device_t dev, uint8_t address, uint8_t 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, 0x20 + (pbus->link * 4));
index 2a9fe94690a2e6ef2fa1edafcd5a9a4b77b6da92..4c07a6016234a687d8c18a1a797143a1a0c5cb26 100644 (file)
@@ -84,7 +84,7 @@ void mcp55_enable(device_t dev)
                deviceid = dev->device;
        }
 
-       devfn = (dev->path.u.pci.devfn) & ~7;
+       devfn = (dev->path.pci.devfn) & ~7;
        switch(deviceid) {
                case PCI_DEVICE_ID_NVIDIA_MCP55_HT:
                        return;
@@ -124,7 +124,7 @@ void mcp55_enable(device_t dev)
                case PCI_DEVICE_ID_NVIDIA_MCP55_SATA1: //three
                        devfn -= (4<<3);
                        index = 22;
-                       i = (dev->path.u.pci.devfn) & 7;
+                       i = (dev->path.pci.devfn) & 7;
                        if(i>0) {
                                index -= (i+3);
                        }
index 15c52963c3497cb0bb76c6c99707335664fc3329..cff22a3af746e6bbdb73563706c9d3209cb79443 100644 (file)
@@ -38,7 +38,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, 0x20 + (pbus->link * 4));
@@ -52,7 +52,7 @@ static int lsmbus_send_byte(device_t dev, uint8_t 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, 0x20 + (pbus->link * 4));
@@ -66,7 +66,7 @@ static int lsmbus_read_byte(device_t dev, uint8_t 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, 0x20 + (pbus->link * 4));
@@ -80,7 +80,7 @@ static int lsmbus_write_byte(device_t dev, uint8_t address, uint8_t 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, 0x20 + (pbus->link * 4));
index 59cc7af45b901d4f4ff4f71aae3907e3ac099a21..990fd1703dd1464cfbda43b956646bab631ad7ce 100644 (file)
@@ -54,7 +54,7 @@ static void rl5c476_init(device_t dev)
        pci_write_config16(dev,0x82,0x00a0);
 
        /* set up second slot as compact flash port if asked to do so */
-       if( enable_cf_boot && (PCI_FUNC(dev->path.u.pci.devfn) == 1)){ 
+       if( enable_cf_boot && (PCI_FUNC(dev->path.pci.devfn) == 1)){ 
 
                /* make sure isa interrupts are enabled */
                pci_write_config16(dev,0x3e,0x0780);
@@ -154,7 +154,7 @@ void rl5c476_read_resources(device_t dev)
        struct resource *resource;
 
         /* for cf socket we need an extra memory window for the control structure of the cf itself */
-       if( enable_cf_boot && (PCI_FUNC(dev->path.u.pci.devfn) == 1)){ 
+       if( enable_cf_boot && (PCI_FUNC(dev->path.pci.devfn) == 1)){ 
                resource = new_resource(dev,1);    /* fake index as it isn't in pci config space */
                resource->flags |= IORESOURCE_MEM ;
                resource->size = 0x1000;
@@ -168,7 +168,7 @@ void rl5c476_set_resources(device_t dev)
 {
        struct resource *resource;
        printk_debug("%s In set resources \n",dev_path(dev));
-       if( enable_cf_boot && (PCI_FUNC(dev->path.u.pci.devfn) == 1)){
+       if( enable_cf_boot && (PCI_FUNC(dev->path.pci.devfn) == 1)){
                resource = find_resource(dev,1);
                if( !(resource->flags & IORESOURCE_STORED) ){
                        resource->flags |= IORESOURCE_STORED ;
index 436ab921e0f44cbef07d22cb57ca53c980b4c247..090e6e9e210a7b70807e7aa237d94ddd0d6b31c4 100644 (file)
@@ -80,7 +80,7 @@ static void sis761_read_resources(device_t dev)
        pci_dev_read_resources(dev);
 
        /* If we are not the first processor don't allocate the gart apeture */
-       if (dev->path.u.pci.devfn != PCI_DEVFN(0x0, 0)) {
+       if (dev->path.pci.devfn != PCI_DEVFN(0x0, 0)) {
                printk_debug("sis761_not_the_first_processor !!!\n");
                return;
        }
index 7c00241d1afa89b63046123534b3f3b53a497818..3d7b0f7284627bbd16de70f23a9b1295ba832610 100644 (file)
@@ -83,7 +83,7 @@ void sis966_enable(device_t dev)
                deviceid = dev->device;
        }
 
-       devfn = (dev->path.u.pci.devfn) & ~7;
+       devfn = (dev->path.pci.devfn) & ~7;
        switch(deviceid) {
                case PCI_DEVICE_ID_SIS_SIS966_USB:
                        devfn -= (1<<3);
@@ -115,7 +115,7 @@ void sis966_enable(device_t dev)
                case PCI_DEVICE_ID_SIS_SIS966_SATA:
                        devfn -= (4<<3);
                        index = 22;
-                       i = (dev->path.u.pci.devfn) & 7;
+                       i = (dev->path.pci.devfn) & 7;
                        if(i>0) {
                                index -= (i+3);
                        }
index 51e8364d65b2e67b538eb7003583f8e338721a9f..bffcd7399f75f96b588078e885e3de924b0a397e 100644 (file)
 
 static void pnp_enter_conf_state(device_t dev) 
 {
-       outb(0x87, dev->path.u.pnp.port);
+       outb(0x87, dev->path.pnp.port);
 }
 
 static void pnp_exit_conf_state(device_t dev) 
 {
-       outb(0xaa, dev->path.u.pnp.port);
+       outb(0xaa, dev->path.pnp.port);
 }
 
 static void f71805f_init(device_t dev)
@@ -47,7 +47,7 @@ static void f71805f_init(device_t dev)
        if (!dev->enabled)
                return;
        
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        /* TODO: Might potentially need code for HWM or FDC etc. */
        case F71805F_SP1:
                res0 = find_resource(dev, PNP_IDX_IO0);
index 340fb00c50567fc9b652db7498aa2ecd79cfe8a3..db3047b45909b2826bfc8e260d023d9a3864f240 100644 (file)
 
 static void pnp_enter_ext_func_mode(device_t dev)
 {
-       outb(0x80, dev->path.u.pnp.port);
-       outb(0x86, dev->path.u.pnp.port);
+       outb(0x80, dev->path.pnp.port);
+       outb(0x86, dev->path.pnp.port);
 }
 
 static void pnp_exit_ext_func_mode(device_t dev)
 {
-       outb(0x68, dev->path.u.pnp.port);
-       outb(0x08, dev->path.u.pnp.port);
+       outb(0x68, dev->path.pnp.port);
+       outb(0x08, dev->path.pnp.port);
 }
 
 static void i3100_init(device_t dev)
@@ -49,7 +49,7 @@ static void i3100_init(device_t dev)
 
        conf = dev->chip_info;
 
-       switch (dev->path.u.pnp.device) {
+       switch (dev->path.pnp.device) {
        case I3100_SP1:
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index 1acf7e3deb627235629b5c081ed0efa091f7e68d..20e5070678b73da047222c22f1fc7150791ffcc3 100644 (file)
@@ -38,7 +38,7 @@ static void init(device_t dev)
 
        conf = dev->chip_info;
 
-       switch (dev->path.u.pnp.device) {
+       switch (dev->path.pnp.device) {
        case IT8661F_FDC: /* TODO. */
                break;
        case IT8661F_SP1:
index bc9716374e01eca285c249025a7756915e2e622a..f77c8bddb16af694b7f8dac148ded4d387fa3835 100644 (file)
@@ -37,7 +37,7 @@ static void init(device_t dev)
 
        conf = dev->chip_info;
 
-       switch (dev->path.u.pnp.device) {
+       switch (dev->path.pnp.device) {
        case IT8671F_FDC: /* TODO. */
                break;
        case IT8671F_SP1:
index 12f7fcfc387796047bb8a8f7079dd78c0cc6cfb2..f4dff1403a92cb7898da10a84f9935997f156203 100644 (file)
@@ -37,7 +37,7 @@ static void init(device_t dev)
 
        conf = dev->chip_info;
 
-       switch (dev->path.u.pnp.device) {
+       switch (dev->path.pnp.device) {
        case IT8673F_FDC: /* TODO. */
                break;
        case IT8673F_SP1:
index 095e39a7dff76e1898700bee6051007e5adf5d22..fda705c27a4fe7e9004e764016c8438865b93223 100644 (file)
@@ -38,7 +38,7 @@ static void init(device_t dev)
 
        conf = dev->chip_info;
 
-       switch (dev->path.u.pnp.device) {
+       switch (dev->path.pnp.device) {
        case IT8705F_FDC: /* TODO. */
                break;
        case IT8705F_SP1:
index 8619ebc2f53437d32e377ddc065f9341f4db3d58..6a461f74d877ce7b834cdce8282971146e962f16 100644 (file)
 /* Base address 0x4e: 0x87 0x01 0x55 0xaa. */
 static void pnp_enter_ext_func_mode(device_t dev)
 {
-       outb(0x87, dev->path.u.pnp.port);
-       outb(0x01, dev->path.u.pnp.port);
-       outb(0x55, dev->path.u.pnp.port);
+       outb(0x87, dev->path.pnp.port);
+       outb(0x01, dev->path.pnp.port);
+       outb(0x55, dev->path.pnp.port);
 
-       if (dev->path.u.pnp.port == 0x4e) {
-               outb(0xaa, dev->path.u.pnp.port);
+       if (dev->path.pnp.port == 0x4e) {
+               outb(0xaa, dev->path.pnp.port);
        } else {
-               outb(0x55, dev->path.u.pnp.port);
+               outb(0x55, dev->path.pnp.port);
        }
 }
 
@@ -59,7 +59,7 @@ static void it8712f_init(device_t dev)
 
        conf = dev->chip_info;
 
-       switch (dev->path.u.pnp.device) {
+       switch (dev->path.pnp.device) {
        case IT8712F_FDC: /* TODO. */
                break;
        case IT8712F_SP1:
index 63744ddfbc6854951f8f0aef9cc1a36fa976615d..c537ded431a6dc0353675b673729f154ad677306 100644 (file)
 /* Base address 0x4e: 0x87 0x01 0x55 0xaa. */
 static void pnp_enter_ext_func_mode(device_t dev)
 {
-       outb(0x87, dev->path.u.pnp.port);
-       outb(0x01, dev->path.u.pnp.port);
-       outb(0x55, dev->path.u.pnp.port);
+       outb(0x87, dev->path.pnp.port);
+       outb(0x01, dev->path.pnp.port);
+       outb(0x55, dev->path.pnp.port);
 
-       if (dev->path.u.pnp.port == 0x4e) {
-               outb(0xaa, dev->path.u.pnp.port);
+       if (dev->path.pnp.port == 0x4e) {
+               outb(0xaa, dev->path.pnp.port);
        } else {
-               outb(0x55, dev->path.u.pnp.port);
+               outb(0x55, dev->path.pnp.port);
        }
 }
 
@@ -95,7 +95,7 @@ static void it8716f_init(device_t dev)
        conf = dev->chip_info;
 
        /* TODO: FDC, PP, KBCM, MIDI, GAME, IR. */
-       switch (dev->path.u.pnp.device) {
+       switch (dev->path.pnp.device) {
        case IT8716F_SP1:
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index 13930f41de43837777ae4641a78f5f6bd6ae0e2a..3c1f541b137f8ceacd8e093ca3e4fd1a48a52f5a 100644 (file)
@@ -37,7 +37,7 @@ static void init(device_t dev)
 
        conf = dev->chip_info;
 
-       switch (dev->path.u.pnp.device) {
+       switch (dev->path.pnp.device) {
        case IT8718F_FDC: /* TODO. */
                break;
        case IT8718F_SP1:
index 0d8854fe8317656a5245bad943c75e8c1abd40f1..7368fe77bb3a81094f778c47b76cef8291c34720 100644 (file)
@@ -25,7 +25,7 @@ static void init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case PC8374_SP1: 
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index 7f98523ad5d95fa7d18201b15257bc9556e604d0..6ae33ca544a3515ec3a873b6f9a9da499a95b84c 100644 (file)
@@ -36,7 +36,7 @@ static void init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch (dev->path.u.pnp.device) {
+       switch (dev->path.pnp.device) {
        case PC87309_SP1:
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index c5bdeda7d1356e17f2dbef2ac85c8d7f8ceb6e93..55e4e1098a97f6a5e8ccdfb94c11b3907534402e 100644 (file)
@@ -31,7 +31,7 @@ static void init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case PC87351_SP1: 
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index a332a2706491b13d51d4e99facb72282e81d8b1a..0cd3c4a65ca1d1fd42ccdac6e973c1539576f4d2 100644 (file)
@@ -25,7 +25,7 @@ static void init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case PC87360_SP1: 
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index 03cc6a9863f7839fc153c63f8ec965a81ddf27f6..514893dad165407df022d2e82411e3728a0788e5 100644 (file)
@@ -25,7 +25,7 @@ static void init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case PC87366_SP1: 
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index 1eea29d0ca4fd28e5e829de03373f6df22106a2b..965fbd0d4188e51176c8fc22c7ccac1a9cc87f8a 100644 (file)
@@ -27,7 +27,7 @@ static void init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case PC87417_SP1: 
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index b8fe32c2e39e7c93749592afd5e753aee7e5e719..089392d3f9a7a3c6b1241ebef78c593dbad3c0ea 100644 (file)
@@ -24,7 +24,7 @@ static void init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case PC87427_SP1: 
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index 5b75943f262afd00a302107a73e29c0031163621..1e4d6d6aae01d65759dd93559910b90873baaefb 100644 (file)
@@ -18,7 +18,7 @@ static void init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case PC97307_SP1:
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index 7945564bf3e7b461f980dac70ef0c1f2a56f0090..30c819a773d677477f16caf8d5149d929bdfb4bb 100644 (file)
@@ -18,7 +18,7 @@ static void init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case PC97317_SP1:
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index 716cb8b2cb44d5214cd79a25a55ece22f9e76ddf..54225162c5ceab292abb7991a9ae394551efa49d 100644 (file)
@@ -37,7 +37,7 @@ static void init(device_t dev)
 
        conf = dev->chip_info;
 
-       switch (dev->path.u.pnp.device) {
+       switch (dev->path.pnp.device) {
        case FDC37M60X_FDC: /* TODO. */
                break;
        case FDC37M60X_PP: /* TODO. */
index e8fc7bddb04b5e50bf7c265998dc6616306141eb..80b0c233db428d986049bda5f7fc1d910ec6e7be 100644 (file)
@@ -140,7 +140,7 @@ static void lpc47b272_init(device_t dev)
        if (!dev->enabled)
                return;
        
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case LPC47B272_SP1: 
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
@@ -171,7 +171,7 @@ static void lpc47b272_init(device_t dev)
 //
 static void pnp_enter_conf_state(device_t dev) 
 {
-       outb(0x55, dev->path.u.pnp.port);
+       outb(0x55, dev->path.pnp.port);
 }
 
 //----------------------------------------------------------------------------------
@@ -182,7 +182,7 @@ static void pnp_enter_conf_state(device_t dev)
 //
 static void pnp_exit_conf_state(device_t dev) 
 {
-    outb(0xaa, dev->path.u.pnp.port);
+    outb(0xaa, dev->path.pnp.port);
 }
 
 #if 0
index 0f66894499e645fadbfc1ff68979cd7328b5e778..5dc8e1f37663136278ce210d2679042e460fb2b2 100644 (file)
 
 
 static void pnp_enter_conf_state(device_t dev) {
-       outb(0x55, dev->path.u.pnp.port);
+       outb(0x55, dev->path.pnp.port);
 }
 static void pnp_exit_conf_state(device_t dev) {
-       outb(0xaa, dev->path.u.pnp.port);
+       outb(0xaa, dev->path.pnp.port);
 }
 
 static void pnp_write_index(unsigned long port_base, uint8_t reg, uint8_t value)
@@ -56,7 +56,7 @@ static void lpc47b397_init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case LPC47B397_SP1:
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
@@ -96,7 +96,7 @@ void lpc47b397_pnp_enable_resources(device_t dev)
 
        pnp_enable_resources(dev);
 
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case LPC47B397_HWM:
                printk_debug("lpc47b397 SensorBus Register Access enabled\r\n");
                pnp_set_logical_device(dev);
@@ -153,7 +153,7 @@ static int lsmbus_read_byte(device_t dev, uint8_t address)
        struct resource *res;
        int result;
 
-       device = dev->path.u.i2c.device;
+       device = dev->path.i2c.device;
 
        res = find_resource(get_pbus_smbus(dev)->dev, PNP_IDX_IO0);
 
@@ -169,7 +169,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, PNP_IDX_IO0);
 
        pnp_write_index(res->base+HWM_INDEX, 0, device); // why 0?
index ec72beaa3494c970a3794829b325cca23701a01c..bbe6cc3e15cf1f0e26503be208b4af392cde05f1 100644 (file)
@@ -138,7 +138,7 @@ static void lpc47m10x_init(device_t dev)
        if (!dev->enabled)
                return;
        
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case LPC47M10X2_SP1: 
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
@@ -169,7 +169,7 @@ static void lpc47m10x_init(device_t dev)
 //
 static void pnp_enter_conf_state(device_t dev) 
 {
-       outb(0x55, dev->path.u.pnp.port);
+       outb(0x55, dev->path.pnp.port);
 }
 
 //----------------------------------------------------------------------------------
@@ -180,7 +180,7 @@ static void pnp_enter_conf_state(device_t dev)
 //
 static void pnp_exit_conf_state(device_t dev) 
 {
-    outb(0xaa, dev->path.u.pnp.port);
+    outb(0xaa, dev->path.pnp.port);
 }
 
 #if 0
index 3c0056cb7023200dad19c1736c54251b80dbc6a3..f64ec7319878710335a02092842eb7d730bf381d 100644 (file)
@@ -158,7 +158,7 @@ static void lpc47n217_init(device_t dev)
        if (!dev->enabled)
                return;
 
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case LPC47N217_SP1: 
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
@@ -211,7 +211,7 @@ void lpc47n217_pnp_set_iobase(device_t dev, unsigned iobase)
 {
        ASSERT(!(iobase & 0x3));
        
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case LPC47N217_PP: 
                pnp_write_config(dev, 0x23, (iobase >> 2) & 0xff);
                break;
@@ -232,7 +232,7 @@ void lpc47n217_pnp_set_iobase(device_t dev, unsigned iobase)
 
 void lpc47n217_pnp_set_drq(device_t dev, unsigned drq)
 {
-       if (dev->path.u.pnp.device == LPC47N217_PP) {
+       if (dev->path.pnp.device == LPC47N217_PP) {
                const uint8_t PP_DMA_MASK = 0x0F;
                const uint8_t PP_DMA_SELECTION_REGISTER = 0x26;
                uint8_t current_config = pnp_read_config(dev, PP_DMA_SELECTION_REGISTER);
@@ -253,7 +253,7 @@ void lpc47n217_pnp_set_irq(device_t dev, unsigned irq)
        uint8_t current_config;
        uint8_t new_config;
        
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case LPC47N217_PP: 
                irq_config_register = 0x27;
                irq_config_mask = 0x0F;
@@ -289,7 +289,7 @@ void lpc47n217_pnp_set_enable(device_t dev, int enable)
        uint8_t current_power;
        uint8_t new_power;
        
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case LPC47N217_PP: 
                power_register = 0x01;
                power_mask = 0x04;
@@ -334,7 +334,7 @@ void lpc47n217_pnp_set_enable(device_t dev, int enable)
 //
 static void pnp_enter_conf_state(device_t dev) 
 {
-       outb(0x55, dev->path.u.pnp.port);
+       outb(0x55, dev->path.pnp.port);
 }
 
 //----------------------------------------------------------------------------------
@@ -345,7 +345,7 @@ static void pnp_enter_conf_state(device_t dev)
 //
 static void pnp_exit_conf_state(device_t dev) 
 {
-    outb(0xaa, dev->path.u.pnp.port);
+    outb(0xaa, dev->path.pnp.port);
 }
 
 #if 0
index dae720eb6bdf24721cf453709dae2d0fa9ef6493..14ac03f8b183b6b0c4eb1a0e6e505d81ae7a6a95 100644 (file)
@@ -143,7 +143,7 @@ static const struct logical_devices {
  */
 static inline void smsc_pnp_enter_conf_state(device_t dev)
 {
-       outb(0x55, dev->path.u.pnp.port);
+       outb(0x55, dev->path.pnp.port);
 }
 
 /**
@@ -155,7 +155,7 @@ static inline void smsc_pnp_enter_conf_state(device_t dev)
  */
 static inline void smsc_pnp_exit_conf_state(device_t dev)
 {
-       outb(0xaa, dev->path.u.pnp.port);
+       outb(0xaa, dev->path.pnp.port);
 }
 
 /** Wrapper for pnp_set_resources(). */
@@ -213,7 +213,7 @@ static void smsc_init(device_t dev)
                return;
 
        /* A Super I/O was found, so initialize the respective device. */
-       ld = dev->path.u.pnp.device;
+       ld = dev->path.pnp.device;
        if (ld == logical_device_table[i].devs[LD_SP1]) {
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index be29c76e676538c1658f1fda80a53955040ce18f..53e4523cd85665f5782de1afb9d3f806161fdc81 100644 (file)
@@ -50,19 +50,19 @@ static unsigned char vt1211hwmonitorinits[]={
 
 static void pnp_enter_ext_func_mode(device_t dev) 
 {
-       outb(0x87, dev->path.u.pnp.port);
-       outb(0x87, dev->path.u.pnp.port);
+       outb(0x87, dev->path.pnp.port);
+       outb(0x87, dev->path.pnp.port);
 }
 
 static void pnp_exit_ext_func_mode(device_t dev) 
 {
-       outb(0xaa, dev->path.u.pnp.port);
+       outb(0xaa, dev->path.pnp.port);
 }
 
 static void vt1211_set_iobase(device_t dev, unsigned index, unsigned iobase)
 {
 
-       switch (dev->path.u.pnp.device) {
+       switch (dev->path.pnp.device) {
                case VT1211_FDC:
                case VT1211_PP:
                case VT1211_SP1:
@@ -98,7 +98,7 @@ static void vt1211_init(struct device *dev)
                return;
        }
 
-       switch (dev->path.u.pnp.device) {
+       switch (dev->path.pnp.device) {
        case VT1211_FDC:
        case VT1211_PP:
                break;
@@ -135,7 +135,7 @@ void vt1211_pnp_set_resources(struct device *dev)
        struct resource *resource;
 
 #if CONFIG_CONSOLE_SERIAL8250 == 1
-       if( dev->path.u.pnp.device == 2 ){
+       if( dev->path.pnp.device == 2 ){
                for( i = 0 ; i < dev->resources; i++){
                        resource = &dev->resource[i];
                        resource->flags |= IORESOURCE_STORED;
index 9398313ea49ab02fc37aece5eb2e0ebfb356e1f6..a1c3f1e4b60b00339a5439ee1211281c589d089d 100644 (file)
 
 static void pnp_enter_ext_func_mode(device_t dev)
 {
-       outb(0x87, dev->path.u.pnp.port);
-       outb(0x87, dev->path.u.pnp.port);
+       outb(0x87, dev->path.pnp.port);
+       outb(0x87, dev->path.pnp.port);
 }
 
 static void pnp_exit_ext_func_mode(device_t dev)
 {
-       outb(0xaa, dev->path.u.pnp.port);
+       outb(0xaa, dev->path.pnp.port);
 }
 
 static void w83627dhg_init(device_t dev)
@@ -47,7 +47,7 @@ static void w83627dhg_init(device_t dev)
 
        conf = dev->chip_info;
 
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case W83627DHG_SP1:
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index d12bb67be385b25b15b712930150e831e6578444..bd73e0e85d03b4c334c13d185396f8a36db94288 100644 (file)
 
 static void pnp_enter_ext_func_mode(device_t dev)
 {
-       outb(0x87, dev->path.u.pnp.port);
-       outb(0x87, dev->path.u.pnp.port);
+       outb(0x87, dev->path.pnp.port);
+       outb(0x87, dev->path.pnp.port);
 }
 
 static void pnp_exit_ext_func_mode(device_t dev)
 {
-       outb(0xaa, dev->path.u.pnp.port);
+       outb(0xaa, dev->path.pnp.port);
 }
 
 static void pnp_write_index(unsigned long port_base, uint8_t reg, uint8_t value)
@@ -73,7 +73,7 @@ static void init_acpi(device_t dev)
 
        get_option(&power_on, "power_on_after_fail");
        pnp_enter_ext_func_mode(dev);
-       pnp_write_index(dev->path.u.pnp.port, 7, 0x0a);
+       pnp_write_index(dev->path.pnp.port, 7, 0x0a);
        value = pnp_read_config(dev, 0xe4);
        value &= ~(3 << 5);
        if (power_on) {
@@ -112,7 +112,7 @@ static void w83627ehg_init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case W83627EHG_SP1:
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
@@ -149,7 +149,7 @@ void w83627ehg_pnp_enable_resources(device_t dev)
        pnp_enter_ext_func_mode(dev);
        pnp_enable_resources(dev);
 
-       switch (dev->path.u.pnp.device) {
+       switch (dev->path.pnp.device) {
        case W83627EHG_HWM:
                printk_debug("w83627ehg hwm smbus enabled\n");
                enable_hwm_smbus(dev);
index bbdb7bffa992f79d68ec50ff2fa13fc87f267f0d..123abc48fb3d62d0c9cd6b528a40c2bb1c024a3e 100644 (file)
 
 static void pnp_enter_ext_func_mode(device_t dev)
 {
-       outb(0x87, dev->path.u.pnp.port);
-       outb(0x87, dev->path.u.pnp.port);
+       outb(0x87, dev->path.pnp.port);
+       outb(0x87, dev->path.pnp.port);
 }
 static void pnp_exit_ext_func_mode(device_t dev)
 {
-       outb(0xaa, dev->path.u.pnp.port);
+       outb(0xaa, dev->path.pnp.port);
 }
 
 static void pnp_write_index(unsigned long port_base, uint8_t reg, uint8_t value)
@@ -56,7 +56,7 @@ static void init_acpi(device_t dev)
 
        get_option(&power_on, "power_on_after_fail");
        pnp_enter_ext_func_mode(dev);
-       pnp_write_index(dev->path.u.pnp.port,7,0x0a);
+       pnp_write_index(dev->path.pnp.port,7,0x0a);
        value = pnp_read_config(dev, 0xE4);
        value &= ~(3<<5);
        if(power_on) {
@@ -104,7 +104,7 @@ static void w83627hf_init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case W83627HF_SP1:
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
@@ -141,7 +141,7 @@ void w83627hf_pnp_enable_resources(device_t dev)
 {
        pnp_enter_ext_func_mode(dev);
        pnp_enable_resources(dev);
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case W83627HF_HWM:
                printk_debug("w83627hf hwm smbus enabled\n");
                enable_hwm_smbus(dev);
index 28fd72f6df85af77c5fd88f32bc048a26aeed5b3..8fb138d5d76846b40234911224dc734fd6567428 100644 (file)
 
 static void w83627thf_enter_ext_func_mode(device_t dev) 
 {
-        outb(0x87, dev->path.u.pnp.port);
-        outb(0x87, dev->path.u.pnp.port);
+        outb(0x87, dev->path.pnp.port);
+        outb(0x87, dev->path.pnp.port);
 }
 static void w83627thf_exit_ext_func_mode(device_t dev) 
 {
-        outb(0xaa, dev->path.u.pnp.port);
+        outb(0xaa, dev->path.pnp.port);
 }
 
 static void w83627thf_init(device_t dev)
@@ -37,7 +37,7 @@ static void w83627thf_init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case W83627THF_SP1: 
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index ed838a49b7f7d632c3f08ad074f3ed4b3af0d7c7..01bb410df3921532f04a9dcb811c168553a870a8 100644 (file)
 
 static void w83627thg_enter_ext_func_mode(device_t dev) 
 {
-        outb(0x87, dev->path.u.pnp.port);
-        outb(0x87, dev->path.u.pnp.port);
+        outb(0x87, dev->path.pnp.port);
+        outb(0x87, dev->path.pnp.port);
 }
 static void w83627thg_exit_ext_func_mode(device_t dev) 
 {
-        outb(0xaa, dev->path.u.pnp.port);
+        outb(0xaa, dev->path.pnp.port);
 }
 
 static void w83627thg_init(device_t dev)
@@ -36,7 +36,7 @@ static void w83627thg_init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case W83627THG_SP1: 
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index 796b20a8dcb8b55288d82d54bc89e24143eafe91..e6b6375513f58ad9716ee1f3a824b62de49696c1 100644 (file)
 
 static void w83627uhg_enter_ext_func_mode(device_t dev)
 {
-       outb(0x87, dev->path.u.pnp.port);
-       outb(0x87, dev->path.u.pnp.port);
+       outb(0x87, dev->path.pnp.port);
+       outb(0x87, dev->path.pnp.port);
 }
 
 static void w83627uhg_exit_ext_func_mode(device_t dev)
 {
-       outb(0xaa, dev->path.u.pnp.port);
+       outb(0xaa, dev->path.pnp.port);
 }
 
 /*
@@ -79,7 +79,7 @@ static void w83627uhg_init(device_t dev)
                return;
 
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case W83627UHG_SP1: 
                res0 = find_resource(dev, PNP_IDX_IO0);
                /* set_uart_clock_source(dev, 0); */
index 55fa08534e8ccb8ab423cf30892a266301d7fe0d..c5108250b1202ce37be7ed98602f95fa20dd944a 100644 (file)
 
 static void pnp_enter_ext_func_mode(device_t dev)
 {
-       outb(0x87, dev->path.u.pnp.port);
-       outb(0x87, dev->path.u.pnp.port);
+       outb(0x87, dev->path.pnp.port);
+       outb(0x87, dev->path.pnp.port);
 }
 
 static void pnp_exit_ext_func_mode(device_t dev)
 {
-       outb(0xaa, dev->path.u.pnp.port);
+       outb(0xaa, dev->path.pnp.port);
 }
 
 static void w83697hf_init(device_t dev)
@@ -50,7 +50,7 @@ static void w83697hf_init(device_t dev)
                return;
 
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case W83697HF_SP1:
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index 64cdc5da1a7fce77172136416b1bd329d36a71b8..0230e58201784c52625b41052ace41dcecf80825 100644 (file)
 
 static void w83977f_enter_ext_func_mode(device_t dev) 
 {
-       outb(0x87, dev->path.u.pnp.port);
-       outb(0x87, dev->path.u.pnp.port);
+       outb(0x87, dev->path.pnp.port);
+       outb(0x87, dev->path.pnp.port);
 }
 static void w83977f_exit_ext_func_mode(device_t dev) 
 {
-       outb(0xaa, dev->path.u.pnp.port);
+       outb(0xaa, dev->path.pnp.port);
 }
 
 static void w83977f_init(device_t dev)
@@ -49,7 +49,7 @@ static void w83977f_init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case W83977F_SP1:
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index fca98ca59e0a578ddd4de18f1885d0fce6b1f10b..10985e7d71198776e7f1fb3d53498b92deb87297 100644 (file)
 
 static void w83977tf_enter_ext_func_mode(device_t dev) 
 {
-        outb(0x87, dev->path.u.pnp.port);
-        outb(0x87, dev->path.u.pnp.port);
+        outb(0x87, dev->path.pnp.port);
+        outb(0x87, dev->path.pnp.port);
 }
 static void w83977tf_exit_ext_func_mode(device_t dev) 
 {
-        outb(0xaa, dev->path.u.pnp.port);
+        outb(0xaa, dev->path.pnp.port);
 }
 
 static void w83977tf_init(device_t dev)
@@ -44,7 +44,7 @@ static void w83977tf_init(device_t dev)
                return;
        }
        conf = dev->chip_info;
-       switch(dev->path.u.pnp.device) {
+       switch(dev->path.pnp.device) {
        case W83977TF_SP1: 
                res0 = find_resource(dev, PNP_IDX_IO0);
                init_uart8250(res0->base, &conf->com1);
index 074ad0be1ec29ade252267f943adbdafa20e68a9..91c5bad4d28895f78e0e06f1ab4e8941561b9ce6 100644 (file)
@@ -93,6 +93,7 @@ class debug_info:
        dict = 4
        statement = 5
        dump = 6
+       gengraph = 7
 
        def __init__(self, *level):
                self.__level = level
@@ -108,7 +109,8 @@ class debug_info:
                        print str
 
 global debug
-debug = debug_info(debug_info.none)
+debug = debug_info(debug_info.dumptree)
+debug = debug_info(debug_info.object)
 
 # -----------------------------------------------------------------------------
 #                    Error Handling
@@ -703,6 +705,18 @@ class partobj:
                else:
                        name = "%s %s" % (name, self.path)
                return name
+
+       def graph_name(self):
+               name = "{ {_dev%d|" % self.instance
+               if (self.part):
+                       name = "%s%s" % (name, self.part)
+               else:
+                       name = "%s%s" % (name, self.chip_or_device)
+               if (self.type_name):
+                       name = "%s}|%s}" % (name, self.type_name)
+               else:
+                       name = "%s}|%s}" % (name, self.parent.type_name)
+               return name
                        
        def dumpme(self, lvl):
                """Dump information about this part for debugging"""
@@ -938,7 +952,7 @@ class partobj:
                        fatal("Invalid device id")
                if ((function < 0) or (function > 7)):
                        fatal("Invalid pci function %s" % function )
-               self.set_path(".type=DEVICE_PATH_PCI,.u={.pci={ .devfn = PCI_DEVFN(0x%x,%d)}}" % (slot, function))
+               self.set_path(".type=DEVICE_PATH_PCI,{.pci={ .devfn = PCI_DEVFN(0x%x,%d)}}" % (slot, function))
 
        def addpnppath(self, port, device):
                """ Add a relative path to a pnp device hanging off our parent """
@@ -946,44 +960,44 @@ class partobj:
                        fatal("Invalid port")
                if ((device < 0) or (device > 0xffff)):
                        fatal("Invalid device")
-               self.set_path(".type=DEVICE_PATH_PNP,.u={.pnp={ .port = 0x%x, .device = 0x%x }}" % (port, device))
+               self.set_path(".type=DEVICE_PATH_PNP,{.pnp={ .port = 0x%x, .device = 0x%x }}" % (port, device))
                
        def addi2cpath(self, device):
                """ Add a relative path to a i2c device hanging off our parent """
                if ((device < 0) or (device > 0x7f)):
                        fatal("Invalid device")
-               self.set_path(".type=DEVICE_PATH_I2C,.u={.i2c={ .device = 0x%x }}" % (device))
+               self.set_path(".type=DEVICE_PATH_I2C,{.i2c={ .device = 0x%x }}" % (device))
 
        def addapicpath(self, apic_id):
                """ Add a relative path to a cpu device hanging off our parent """
                if ((apic_id < 0) or (apic_id > 255)):
                        fatal("Invalid device")
-               self.set_path(".type=DEVICE_PATH_APIC,.u={.apic={ .apic_id = 0x%x }}" % (apic_id))
+               self.set_path(".type=DEVICE_PATH_APIC,{.apic={ .apic_id = 0x%x }}" % (apic_id))
     
        def addpci_domainpath(self, pci_domain):
                """ Add a pci_domain number to a chip """
                if ((pci_domain < 0) or (pci_domain > 0xffff)):
                        fatal("Invalid pci_domain: 0x%x is out of the range 0 to 0xffff" % pci_domain)
-               self.set_path(".type=DEVICE_PATH_PCI_DOMAIN,.u={.pci_domain={ .domain = 0x%x }}" % (pci_domain))
+               self.set_path(".type=DEVICE_PATH_PCI_DOMAIN,{.pci_domain={ .domain = 0x%x }}" % (pci_domain))
     
        def addapic_clusterpath(self, cluster):
                """ Add an apic cluster to a chip """
                if ((cluster < 0) or (cluster > 15)):
                        fatal("Invalid apic cluster: %d is out of the range 0 to ff" % cluster)
-               self.set_path(".type=DEVICE_PATH_APIC_CLUSTER,.u={.apic_cluster={ .cluster = 0x%x }}" % (cluster))
+               self.set_path(".type=DEVICE_PATH_APIC_CLUSTER,{.apic_cluster={ .cluster = 0x%x }}" % (cluster))
     
        def addcpupath(self, cpu_id):
                """ Add a relative path to a cpu device hanging off our parent """
                if ((cpu_id < 0) or (cpu_id > 255)):
                        fatal("Invalid device")
-               self.set_path(".type=DEVICE_PATH_CPU,.u={.cpu={ .id = 0x%x }}" % (cpu_id))
+               self.set_path(".type=DEVICE_PATH_CPU,{.cpu={ .id = 0x%x }}" % (cpu_id))
     
 
        def addcpu_buspath(self, id):
                """ Add a cpu_bus to a chip """
                if ((id < 0) or (id > 255)):
                        fatal("Invalid device")
-               self.set_path(".type=DEVICE_PATH_CPU_BUS,.u={.cpu_bus={ .id = 0x%x }}" % (id))
+               self.set_path(".type=DEVICE_PATH_CPU_BUS,{.cpu_bus={ .id = 0x%x }}" % (id))
     
        def usesoption(self, name):
                """Declare option that can be used by this part"""
@@ -1011,6 +1025,8 @@ def getdict(dict, name):
 
 def setdict(dict, name, value):
        debug.info(debug.dict, "setdict sets %s to %s" % (name, value))
+       if name in dict.keys():
+               print "Duplicate in dict: %s" % name
        dict[name] = value
 
 # options. 
@@ -2310,7 +2326,9 @@ def writecode(image):
        file.write("#include <device/pci.h>\n")
        for path in image.getconfigincludes().values():
                file.write("#include \"%s\"\n" % path)
+       file.write("\n/* pass 0 */\n")
        gencode(image.getroot(), file, 0)
+       file.write("\n/* pass 1 */\n")
        gencode(image.getroot(), file, 1)
        file.close()
 
@@ -2334,6 +2352,75 @@ def gencode(part, file, pass_num):
                kid = kid.next_sibling
        debug.info(debug.gencode, "DONE GENCODE")
 
+def writegraph(image):
+       filename = os.path.join(img_dir, "static.dot")
+       print "Creating", filename
+       file = safe_open(filename, 'w+')
+       file.write("digraph devicetree {\n")
+       file.write("    rankdir=LR\n")
+       genranks(image.getroot(), file, 0)
+       gennodes(image.getroot(), file)
+       gengraph(image.getroot(), file)
+       file.write("}\n")
+       file.close()
+
+def genranks(part, file, level):
+       #file.write("   # Level %d\n" % level )
+       file.write("    { rank = same; \"dev_%s_%d\"" % (part.type_name,part.instance ))
+       sib = part.next_sibling
+       while (sib):
+               file.write("; \"dev_%s_%d\"" % (sib.type_name, sib.instance))
+               sib = sib.next_sibling
+       file.write("}\n" )
+       # now dump the children 
+       if (part.children):
+               genranks(part.children, file, level + 1)
+
+       kid = part.next_sibling
+       while (kid):
+               if (kid.children):
+                       genranks(kid.children, file, level + 1)
+               kid = kid.next_sibling
+
+
+def gennodes(part, file):
+       file.write("    dev_%s_%d[shape=record, label=\"%s\"];\n" % (part.type_name,part.instance,part.graph_name() ))
+       sib = part.next_sibling
+       while (sib):
+               file.write("    dev_%s_%d[shape=record, label=\"%s\"];\n" % (sib.type_name,sib.instance,sib.graph_name() ))
+               sib = sib.next_sibling
+       # now dump the children
+       if (part.children):
+               gennodes(part.children, file)
+
+       kid = part.next_sibling
+       while (kid):
+               if (kid.children):
+                       gennodes(kid.children, file)
+               kid = kid.next_sibling
+
+
+def gengraph(part, file):
+       if (part.parent != part):
+               file.write("    dev_%s_%d -> dev_%s_%d;\n" % \
+                               (part.parent.type_name, part.parent.instance, \
+                                part.type_name, part.instance ))
+       sib = part.next_sibling
+       while (sib):
+               file.write("    dev_%s_%d -> dev_%s_%d;\n" % \
+                               (sib.parent.type_name, sib.parent.instance, \
+                                sib.type_name, sib.instance ))
+               sib = sib.next_sibling
+
+       kid = part.next_sibling
+       while (kid):
+               if (kid.children):
+                       gengraph(kid.children, file)
+               kid = kid.next_sibling
+
+       if (part.children):
+               gengraph(part.children, file)
+
 def verifyparse():
        """Add any run-time checks to verify that parsing the configuration
        was successful"""
@@ -2423,6 +2510,7 @@ if __name__=='__main__':
                writeinitincludes(image)
                writeimagemakefile(image)
                writeldoptions(image)
+               writegraph(image)
 
        writemakefilesettings(target_dir)
        writemakefile(target_dir)