- Fix fat fingered merge

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1671 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Eric Biederman 2004-10-14 22:35:23 +00:00
parent 3614eebc13
commit 119e00e2e1
1 changed files with 18 additions and 21 deletions

View File

@ -238,8 +238,18 @@ static void verify_cpu_voltages(device_t dev)
#define SMBUS_MUX 0x70 #define SMBUS_MUX 0x70
if (smbus_wait_until_ready(smbus_io_base) < 0) { static void do_verify_cpu_voltages(void)
return -2; {
device_t smbus_dev;
device_t mux, sensor;
struct device_path mux_path, sensor_path;
int result;
int mux_setting;
/* Find the smbus controller */
smbus_dev = dev_find_device(0x1022, 0x746b, 0);
if (!smbus_dev) {
die("SMBUS controller not found\n");
} }
/* Find the smbus mux */ /* Find the smbus mux */
@ -250,25 +260,12 @@ static void verify_cpu_voltages(device_t dev)
die("SMBUS mux not found\n"); die("SMBUS mux not found\n");
} }
global_status_register = inw(smbus_io_base + SMBGSTATUS); /* Find the adm1026 sensor */
sensor_path.type = DEVICE_PATH_I2C;
/* read results of transaction */ sensor_path.u.i2c.device = ADM1026_DEVICE;
byte = inw(smbus_io_base + SMBHSTDAT) & 0xff; sensor = find_dev_path(mux, &sensor_path);
if (!sensor) {
if (global_status_register != (1 << 4)) { die("ADM1026 not found\n");
return -1;
}
return byte;
}
#if 0
static int smbus_read_byte(unsigned smbus_io_base, unsigned device, unsigned address)
{
unsigned char global_status_register;
unsigned char byte;
if (smbus_wait_until_ready(smbus_io_base) < 0) {
return -2;
} }
/* Set the mux to see the temperature sensors */ /* Set the mux to see the temperature sensors */