Various Doxygen comment fixes, typo fixes, etc.
[coreboot.git] / src / devices / smbus_ops.c
index e2cd0543eb1bcf2dbb8986ea81c7441695d0e116..9d134619b89d771f4e23fbbf083d73940dc09044 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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)
@@ -32,18 +32,21 @@ struct bus *get_pbus_smbus(device_t dev)
                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?
@@ -54,15 +57,15 @@ int smbus_set_link(device_t dev)
                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;
 }
@@ -111,5 +114,3 @@ int smbus_block_write(device_t dev, uint8_t cmd, uint8_t bytes, const uint8_t *b
 {
        return ops_smbus_bus(get_pbus_smbus(dev))->block_write(dev, cmd, bytes, buffer);
 }
-
-