code reformat
authorLi-Ta Lo <ollie@lanl.gov>
Thu, 8 Jul 2004 16:54:20 +0000 (16:54 +0000)
committerLi-Ta Lo <ollie@lanl.gov>
Thu, 8 Jul 2004 16:54:20 +0000 (16:54 +0000)
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1621 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/devices/hypertransport.c
src/devices/pci_device.c

index db7426767d175840d7a499145bd0f90653ee1199..2126889e1906c0404880bbf9e7e73b51d0b553db 100644 (file)
@@ -14,9 +14,9 @@ static device_t ht_scan_get_devs(device_t *old_devices)
        device_t first, last;
        first = *old_devices;
        last = first;
-       while(last && last->sibling && 
-               (last->sibling->path.type == DEVICE_PATH_PCI) &&
-               (last->sibling->path.u.pci.devfn > last->path.u.pci.devfn)) {
+       while (last && last->sibling && 
+              (last->sibling->path.type == DEVICE_PATH_PCI) &&
+              (last->sibling->path.u.pci.devfn > last->path.u.pci.devfn)) {
                last = last->sibling;
        }
        if (first) {
index f40b4d8adf5e97bd041eae6febf198add888c77e..785bf335157112cd0688e7ac37494549e99abb38 100644 (file)
@@ -508,6 +508,8 @@ static struct device *pci_scan_get_dev(struct device **list,
 {
        struct device *dev = 0;
 
+       printk_debug("%s, looking for devfn: %02x.%01x\n", __FUNCTION__,
+                    devfn >> 3, devfn & 7);
        for (; *list; list = &(*list)->sibling) {
                if ((*list)->path.type != DEVICE_PATH_PCI) {
                        printk_err("child %s not a pci device\n",
@@ -523,6 +525,8 @@ static struct device *pci_scan_get_dev(struct device **list,
                }
        }
 
+       printk_debug("%s, found dev %08x\n", __FUNCTION__, dev);
+
        /* FIXME: why are we doing this ? Isn't there some order between the
         * structures before ? */
        if (dev) {
@@ -738,11 +742,11 @@ unsigned int pci_scan_bridge(struct device *dev, unsigned int max)
                  ((unsigned int) (bus->secondary) << 8) |
                  ((unsigned int) (bus->subordinate) << 16));
        pci_write_config32(dev, PCI_PRIMARY_BUS, buses);
-       
+
        /* Now we can scan all subordinate buses i.e. the buses behind the
         * bridge */
        max = pci_scan_bus(bus, 0x00, 0xff, max);
-       
+
        /* We know the number of buses behind this bridge. Set the subordinate
         * bus number to its real value */
        bus->subordinate = max;