From 98d0d30f6b8237f888cd44b33292319e3c167a47 Mon Sep 17 00:00:00 2001 From: "arch import user (historical)" Date: Wed, 6 Jul 2005 17:13:46 +0000 Subject: Revision: linuxbios@linuxbios.org--devel/freebios--devel--2.0--patch-30 Creator: Yinghai Lu Nvidia Ck804 support git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1946 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/devices/root_device.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/devices/root_device.c') 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); -- cgit v1.2.3