diff options
author | arch import user (historical) <svn@openbios.org> | 2005-07-06 17:13:46 +0000 |
---|---|---|
committer | arch import user (historical) <svn@openbios.org> | 2005-07-06 17:13:46 +0000 |
commit | 98d0d30f6b8237f888cd44b33292319e3c167a47 (patch) | |
tree | 0571a9e863b7a7749c2e4fd5bda7ec080831a73c /src/devices/root_device.c | |
parent | 577f185d382c8130f20f0ee7e8466ed8bbebbacc (diff) |
Revision: linuxbios@linuxbios.org--devel/freebios--devel--2.0--patch-30
Creator: Yinghai Lu <yhlu@tyan.com>
Nvidia Ck804 support
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1946 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/root_device.c')
-rw-r--r-- | src/devices/root_device.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/devices/root_device.c b/src/devices/root_device.c index 91c706e4b6..2bb4f0afe8 100644 --- a/src/devices/root_device.c +++ b/src/devices/root_device.c @@ -74,6 +74,7 @@ void root_dev_set_resources(device_t root) * @param max Maximum bus number currently used before scanning. * @return Largest bus number used after scanning. */ +static int smbus_max = 0; unsigned int scan_static_bus(device_t root, unsigned int max) { device_t child; @@ -82,6 +83,11 @@ unsigned int scan_static_bus(device_t root, unsigned int max) printk_spew("%s for %s\n", __func__, dev_path(root)); for (link = 0; link < root->links; link++) { + /* for smbus bus enumerate */ + child = root->link[link].children; + if(child && child->path.type == DEVICE_PATH_I2C) { + root->link[link].secondary = ++smbus_max; + } for (child = root->link[link].children; child; child = child->sibling) { if (child->chip_ops && child->chip_ops->enable_dev) { child->chip_ops->enable_dev(child); |