summaryrefslogtreecommitdiff
path: root/src/drivers/i2c
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2010-06-22 20:36:52 +0000
committerMyles Watson <mylesgw@gmail.com>2010-06-22 20:36:52 +0000
commitad5107e5e6cb6d79e6b3e228226ffd87b72f62f1 (patch)
treef1bb1f7c3d049b2235e14b2e6cd817f4f2bcabdf /src/drivers/i2c
parentccbcc56c642cc0bb9c50514ed8384f67bd36f0d9 (diff)
Finish fixing Tyan s2881. Simplify ADT7463 initialization code.
Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Ward Vandewege <ward@gnu.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5641 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/drivers/i2c')
-rw-r--r--src/drivers/i2c/adt7463/adt7463.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/drivers/i2c/adt7463/adt7463.c b/src/drivers/i2c/adt7463/adt7463.c
index 7639028784..25a65c8371 100644
--- a/src/drivers/i2c/adt7463/adt7463.c
+++ b/src/drivers/i2c/adt7463/adt7463.c
@@ -33,25 +33,11 @@
* See Analog Devices ADT7463 datasheet, Rev C (2004):
* http://www.analog.com/en/prod/0,,766_825_ADT7463,00.html
*/
-static void adt7463_init(device_t dev)
+static void adt7463_init(device_t adt7463)
{
- device_t smbus_dev, adt7463;
- struct device_path path;
int result;
- /* Find the SMBus controller (AMD-8111). */
- smbus_dev = dev_find_device(0x1022, 0x746b, 0);
- if (!smbus_dev)
- die("SMBus controller not found\n");
- printk(BIOS_DEBUG, "SMBus controller found\n");
-
- /* Find the ADT7463 device. */
- path.type = DEVICE_PATH_I2C;
- path.i2c.device = 0x2d;
- adt7463 = find_dev_path(smbus_dev->link_list, &path);
- if (!adt7463)
- die("ADT7463 not found\n");
- printk(BIOS_DEBUG, "ADT7463 found\n");
+ printk(BIOS_DEBUG, "ADT7463 is %s\n", dev_path(adt7463));
/* Set all fans to 'Fastest Speed Calculated by All 3 Temperature
* Channels Controls PWMx'.
@@ -116,7 +102,7 @@ static void enable_dev(struct device *dev)
dev->ops = &adt7463_operations;
}
-struct chip_operations mainboard_ops = {
+struct chip_operations drivers_i2c_adt7463_ops = {
CHIP_NAME("adt7463")
.enable_dev = enable_dev,
};