From 03acab694b3f2fcedd2ffc152db0c08bba8eebdd Mon Sep 17 00:00:00 2001 From: Eric Biederman Date: Thu, 14 Oct 2004 21:25:53 +0000 Subject: - Updates for 64bit resource support, handling missing devices and cpus in the config file git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1664 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/devices/chip.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'src/devices/chip.c') diff --git a/src/devices/chip.c b/src/devices/chip.c index 8315fab674..6882a4b797 100644 --- a/src/devices/chip.c +++ b/src/devices/chip.c @@ -112,8 +112,9 @@ void chip_enumerate(struct chip *chip) struct chip_resource *res, *res_limit; 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)); + printk_spew(" parent: (%p):%d %s\n", + dev->bus->dev, dev->bus->link, + dev_path(dev->bus->dev)); dev->chip = chip; dev->enabled = chip->path[i].enabled; dev->links = link + 1; @@ -127,7 +128,7 @@ void chip_enumerate(struct chip *chip) for(; res < res_limit; res++) { if (res->flags) { struct resource *resource; - resource = get_resource(dev, res->index); + resource = new_resource(dev, res->index); resource->flags = res->flags | IORESOURCE_FIXED | IORESOURCE_ASSIGNED; resource->base = res->base; } @@ -208,7 +209,24 @@ static void enumerate_static_device_chain(struct chip *root) */ void enumerate_static_devices(void) { + struct chip *child; + int i; printk_info("Enumerating static devices...\n"); static_root.dev = &dev_root; + dev_root.links = MAX_LINKS; + for(i = 0; i < MAX_LINKS; i++) { + dev_root.link[i].link = i; + dev_root.link[i].dev = &dev_root; + for(child = static_root.children; child; child = child->next) { + if (!child->bus && child->link == i) { + child->bus = &dev_root.link[i]; + } + } + } + for(child = static_root.children; child; child = child->next) { + if (!child->bus) { + child->bus = &dev_root.link[0]; + } + } enumerate_static_device_chain(&static_root); } -- cgit v1.2.3