/*
- * This file is part of the LinuxBIOS project.
+ * This file is part of the coreboot project.
*
* Copyright (C) 2004 Tyan
* (Written by Yinghai Lu <yhlu@tyan.com> for Tyan)
pbus = pbus->dev->bus;
}
if (!pbus || !pbus->dev || !pbus->dev->ops || !pbus->dev->ops->ops_smbus_bus) {
- printk_alert("%s Cannot find smbus bus operations", dev_path(dev));
+ printk(BIOS_ALERT, "%s Cannot find smbus bus operations", dev_path(dev));
die("");
- for(;;);
}
return pbus;
}
-/*multi level i2c MUX??? may need to find the first i2c device and then set link
- * down to current dev
- 1 store get_pbus_smbus list link
- 2 reverse the link and call set link */
-
+/*
+ * Multi-level I2C MUX? may need to find the first i2c device and then set link
+ * down to current dev.
+ *
+ * 1 store get_pbus_smbus list link
+ * 2 reverse the link and call set link.
+ *
+ * @param dev TODO.
+ */
int smbus_set_link(device_t dev)
{
struct bus *pbus_a[4]; // 4 level mux only. Enough?
pbus_a[pbus_num++] = pbus;
pbus = pbus->dev->bus;
}
-// printk_info("smbus_set_link: ");
+// printk(BIOS_INFO, "smbus_set_link: ");
for (i=pbus_num-1; i>=0; i--) {
-// printk_info(" %s[%d] -> ", dev_path(pbus_a[i]->dev), pbus_a[i]->link);
+// printk(BIOS_INFO, " %s[%d] -> ", dev_path(pbus_a[i]->dev), pbus_a[i]->link);
if (ops_smbus_bus(get_pbus_smbus(pbus_a[i]->dev))) {
if (pbus_a[i]->dev->ops && pbus_a[i]->dev->ops->set_link)
- pbus_a[i]->dev->ops->set_link(pbus_a[i]->dev, pbus_a[i]->link);
+ pbus_a[i]->dev->ops->set_link(pbus_a[i]->dev, pbus_a[i]->link_num);
}
}
-// printk_info(" %s\n", dev_path(dev));
+// printk(BIOS_INFO, " %s\n", dev_path(dev));
return pbus_num;
}
{
return ops_smbus_bus(get_pbus_smbus(dev))->block_write(dev, cmd, bytes, buffer);
}
-
-