diff options
author | Eric Biederman <ebiederm@xmission.com> | 2004-10-16 06:20:29 +0000 |
---|---|---|
committer | Eric Biederman <ebiederm@xmission.com> | 2004-10-16 06:20:29 +0000 |
commit | 7003ba4a88a847707c55d593e517eaa70fc8c63d (patch) | |
tree | ad29fcd2fde474cb9bdd32835a76101edabe1ef9 /src/devices/pnp_device.c | |
parent | 216525d1fd86c13e0f1ebe85ba518cdc1da06fcb (diff) | |
download | coreboot-7003ba4a88a847707c55d593e517eaa70fc8c63d.tar.xz |
- First stab at running linuxbios without the old static device tree.
Things are close but not quite there yet.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1681 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/pnp_device.c')
-rw-r--r-- | src/devices/pnp_device.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/devices/pnp_device.c b/src/devices/pnp_device.c index 9ecfe63a52..70286ad7ac 100644 --- a/src/devices/pnp_device.c +++ b/src/devices/pnp_device.c @@ -185,22 +185,24 @@ static void get_resources(device_t dev, struct pnp_info *info) } } -void pnp_enumerate(struct chip *chip, unsigned functions, - struct device_operations *ops, struct pnp_info *info) +void pnp_enable_devices(device_t base_dev, struct device_operations *ops, + unsigned functions, struct pnp_info *info) { struct device_path path; device_t dev; int i; - chip_enumerate(chip); - path.type = DEVICE_PATH_PNP; - path.u.pnp.port = chip->dev->path.u.pnp.port; + path.u.pnp.port = base_dev->path.u.pnp.port; /* Setup the ops and resources on the newly allocated devices */ for(i = 0; i < functions; i++) { path.u.pnp.device = info[i].function; - dev = alloc_find_dev(chip->bus, &path); + dev = alloc_find_dev(base_dev->bus, &path); + + /* Don't initialize a device multiple times */ + if (dev->ops) + continue; if (info[i].ops == 0) { dev->ops = ops; |