- Minor bugfixes
authorEric Biederman <ebiederm@xmission.com>
Tue, 14 Oct 2003 02:36:51 +0000 (02:36 +0000)
committerEric Biederman <ebiederm@xmission.com>
Tue, 14 Oct 2003 02:36:51 +0000 (02:36 +0000)
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1215 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/devices/hypertransport.c
src/devices/pci_device.c
src/mainboard/amd/solo/Config.lb
src/northbridge/amd/amdk8/northbridge.c
targets/arima/hdama/Config.kernelimage.lb

index 326f343662aa5ba0ccc6f8dad113c09cbefc79da..ba57bc830edf8a467727d54ee406827a8d3240f6 100644 (file)
@@ -14,6 +14,7 @@ static device_t ht_scan_get_devs(device_t *old_devices)
        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)) {
                last = last->sibling;
        }
index 031d855fbfab76fa994ca6b90f320fa0cae137c0..ffa420739ab9bf16942424374116b92c99f79646 100644 (file)
@@ -475,6 +475,10 @@ static struct device *pci_scan_get_dev(struct device **list, unsigned int devfn)
 {
        struct device *dev = 0;
        for(; *list; list = &(*list)->sibling) {
+               if ((*list)->path.type != DEVICE_PATH_PCI) {
+                       printk_err("child %s not a pci device\n", dev_path(*list));
+                       continue;
+               }
                if ((*list)->path.u.pci.devfn == devfn) {
                        /* Unlink from the list */
                        dev = *list;
index 8a43951eb6a8a4edc46af1d17f76eb5e7c90e8cb..70082ed12494586cf8acbbbaa834edb5912111d1 100644 (file)
@@ -228,6 +228,10 @@ northbridge amd/amdk8 "mc0"
        pci 0:18.1
        pci 0:18.2
        pci 0:18.3
+       southbridge amd/amd8151 "amd8151" link 0
+               pci 0:0.0
+               pci 0:1.0
+       end
        southbridge amd/amd8111 "amd8111" link 0
                pci 0:0.0
                pci 0:1.0 on
@@ -256,10 +260,6 @@ northbridge amd/amdk8 "mc0"
                        register "lpt" = "{1}"
                end
        end
-       southbridge amd/amd8151 "amd8151" link 1
-               pci 0:0.0
-               pci 0:1.0
-       end
 end
 
 cpu k8 "cpu0"
index 13845c5a700f240716ddf1983f47e80a4d75cf0e..aed38557d472815c762b4208ae77273ef70de835 100644 (file)
@@ -166,7 +166,7 @@ static unsigned int amdk8_scan_chains(device_t dev, unsigned int max)
        for(link = 0; link < dev->links; link++) {
                uint32_t link_type;
                uint32_t busses, config_busses;
-               unsigned free_reg, config_reg;
+               unsigned free_reg, config_reg, other_reg;
                dev->link[link].cap = 0x80 + (link *0x20);
                do {
                        link_type = pci_read_config32(dev, dev->link[link].cap + 0x18);
@@ -455,7 +455,13 @@ static void amdk8_set_resources(device_t dev)
 
 unsigned int amdk8_scan_root_bus(device_t root, unsigned int max)
 {
-       return pci_scan_bus(&root->link[0], PCI_DEVFN(0x18, 0), 0xff, max);
+       unsigned reg;
+       max = pci_scan_bus(&root->link[0], PCI_DEVFN(0x18, 0), 0xff, max);
+       /* Unmap all of the other pci busses */
+       for(reg = 0xe0; reg <= 0xec; reg += 4) {
+               f1_write_config32(reg, 0);
+       }
+       return max;
 }
 
 static struct device_operations northbridge_operations = {
index 8022ba6233e80b08f6ee2b8b9a19cae9bf5bc146..a9347233db30bb50a8db9a80ff33e8a017e163a5 100644 (file)
@@ -100,4 +100,4 @@ romimage "fallback"
 #      payload /usr/share/etherboot/5.1.9pre2-lnxi-lb/tg3--ide_disk.zelf
 end
 
-buildrom ROM_SIZE "fallback"
+buildrom ./luxbios.rom ROM_SIZE "fallback"