diff options
author | Eric Biederman <ebiederm@xmission.com> | 2003-10-11 06:20:25 +0000 |
---|---|---|
committer | Eric Biederman <ebiederm@xmission.com> | 2003-10-11 06:20:25 +0000 |
commit | 83b991afff40e12a8b6756af06a472842edb1a66 (patch) | |
tree | a441ff0d88afcb0a07cf22dc3653db3e07a05c98 /src/devices/chip.c | |
parent | 080038bfbd8fdf08bac12476a3789495e6f705ca (diff) | |
download | coreboot-83b991afff40e12a8b6756af06a472842edb1a66.tar.xz |
- O2, enums, and switch statements work in romcc
- Support for compiling romcc on non x86 platforms
- new romc options -msse and -mmmx for specifying extra registers to use
- Bug fixes to device the device disable/enable framework and an amd8111 implementation
- Move the link specification to the chip specification instead of the path
- Allow specifying devices with internal bridges.
- Initial via epia support
- Opteron errata fixes
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1200 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/chip.c')
-rw-r--r-- | src/devices/chip.c | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/devices/chip.c b/src/devices/chip.c index b7eace38f0..c9e1ac5643 100644 --- a/src/devices/chip.c +++ b/src/devices/chip.c @@ -46,16 +46,33 @@ void chip_enumerate(struct chip *chip) int identical_paths; identical_paths = (i > 0) && - (path_eq(&chip->path[i - 1].path, &chip->path[i].path)) && - (chip->path[i - 1].channel == chip->path[i].channel); + (path_eq(&chip->path[i - 1].path, &chip->path[i].path)); if (!identical_paths) { + struct bus *parent; + int bus; link = 0; dev = 0; + parent = chip->bus; switch(chip->path[i].path.type) { case DEVICE_PATH_NONE: break; + case DEVICE_PATH_PCI: + bus = chip->path[i].path.u.pci.bus; + if (bus != 0) { + device_t dev; + int i = 1; + dev = chip->dev; + while(dev && (i != bus)) { + dev = dev->next; + i++; + } + if ((i == bus) && dev) { + parent = &dev->link[0]; + } + } + /* Fall through */ default: - dev = alloc_dev(chip->bus, &chip->path[i].path); + dev = alloc_dev(parent, &chip->path[i].path); break; } } @@ -63,12 +80,13 @@ void chip_enumerate(struct chip *chip) link += 1; } if (dev) { - printk_spew("path %s %s\n", dev_path(dev), identical_paths?"identical":""); + printk_spew("path (%p) %s %s", dev, dev_path(dev), identical_paths?"identical":""); + printk_spew(" parent: (%p) %s\n",dev->bus->dev, dev_path(dev->bus->dev)); + dev->chip = chip; dev->enable = chip->path[i].enable; dev->links = link + 1; for(child = chip->children; child; child = child->next) { - if (!child->bus && - child->path[0].channel == i) { + if (!child->bus && child->link == i) { child->bus = &dev->link[link]; } } |