diff options
author | Eric Biederman <ebiederm@xmission.com> | 2004-10-14 21:25:53 +0000 |
---|---|---|
committer | Eric Biederman <ebiederm@xmission.com> | 2004-10-14 21:25:53 +0000 |
commit | 03acab694b3f2fcedd2ffc152db0c08bba8eebdd (patch) | |
tree | 1cd66d4ff0aaccbe4b089389370447d738ba5c7c /src/devices/pnp_device.c | |
parent | 992cd008f1d4217c3e7dd6d0a1e8445ade5da63d (diff) |
- 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
Diffstat (limited to 'src/devices/pnp_device.c')
-rw-r--r-- | src/devices/pnp_device.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/devices/pnp_device.c b/src/devices/pnp_device.c index 4bdb67e4aa..9ecfe63a52 100644 --- a/src/devices/pnp_device.c +++ b/src/devices/pnp_device.c @@ -69,7 +69,7 @@ static void pnp_set_resource(device_t dev, struct resource *resource) { if (!(resource->flags & IORESOURCE_ASSIGNED)) { printk_err("ERROR: %s %02x not allocated\n", - dev_path(dev), resource->index); + dev_path(dev), resource->index); return; } @@ -90,16 +90,7 @@ static void pnp_set_resource(device_t dev, struct resource *resource) } resource->flags |= IORESOURCE_STORED; - printk_debug( - "%s %02x <- [0x%08lx - 0x%08lx] %s\n", - dev_path(dev), - resource->index, - resource->base, resource->base + resource->size - 1, - (resource->flags & IORESOURCE_IO)? "io": - (resource->flags & IORESOURCE_DRQ)? "drq": - (resource->flags & IORESOURCE_IRQ)? "irq": - (resource->flags & IORESOURCE_MEM)? "mem": - "???"); + report_resource_stored(dev, resource, ""); } void pnp_set_resources(device_t dev) @@ -143,7 +134,7 @@ static void pnp_get_ioresource(device_t dev, unsigned index, struct io_info *inf struct resource *resource; uint32_t size; - resource = get_resource(dev, index); + resource = new_resource(dev, index); /* Initilize the resource */ resource->limit = 0xffff; @@ -173,22 +164,22 @@ static void get_resources(device_t dev, struct pnp_info *info) pnp_get_ioresource(dev, PNP_IDX_IO3, &info->io3); } if (info->flags & PNP_IRQ0) { - resource = get_resource(dev, PNP_IDX_IRQ0); + resource = new_resource(dev, PNP_IDX_IRQ0); resource->size = 1; resource->flags |= IORESOURCE_IRQ; } if (info->flags & PNP_IRQ1) { - resource = get_resource(dev, PNP_IDX_IRQ1); + resource = new_resource(dev, PNP_IDX_IRQ1); resource->size = 1; resource->flags |= IORESOURCE_IRQ; } if (info->flags & PNP_DRQ0) { - resource = get_resource(dev, PNP_IDX_DRQ0); + resource = new_resource(dev, PNP_IDX_DRQ0); resource->size = 1; resource->flags |= IORESOURCE_DRQ; } if (info->flags & PNP_DRQ1) { - resource = get_resource(dev, PNP_IDX_DRQ1); + resource = new_resource(dev, PNP_IDX_DRQ1); resource->size = 1; resource->flags |= IORESOURCE_DRQ; } |