Merge pull request #771 from richardg867/master

Hardware monitor fixes
This commit is contained in:
OBattler
2020-05-22 21:02:13 +02:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -128,7 +128,7 @@ lm75_read(lm75_t *dev, uint8_t reg)
/* The AS99127F hardware monitor uses the addresses of its LM75 devices /* The AS99127F hardware monitor uses the addresses of its LM75 devices
to access some of its proprietary registers. Pass this operation on to to access some of its proprietary registers. Pass this operation on to
the main monitor address through an internal SMBus call, if necessary. */ the main monitor address through an internal SMBus call, if necessary. */
if (((reg & 0xf8) != 0x50) && (dev->as99127f_smbus_addr)) if ((reg > 0x7) && ((reg & 0xf8) != 0x50) && (dev->as99127f_smbus_addr))
ret = smbus_read_byte_cmd(dev->as99127f_smbus_addr, reg); ret = smbus_read_byte_cmd(dev->as99127f_smbus_addr, reg);
else else
ret = dev->regs[reg & 0x7]; ret = dev->regs[reg & 0x7];
@@ -191,7 +191,7 @@ lm75_write(lm75_t *dev, uint8_t reg, uint8_t val)
/* The AS99127F hardware monitor uses the addresses of its LM75 devices /* The AS99127F hardware monitor uses the addresses of its LM75 devices
to access some of its proprietary registers. Pass this operation on to to access some of its proprietary registers. Pass this operation on to
the main monitor address through an internal SMBus call, if necessary. */ the main monitor address through an internal SMBus call, if necessary. */
if (((reg & 0xf8) != 0x50) && (dev->as99127f_smbus_addr)) { if ((reg > 0x7) && ((reg & 0xf8) != 0x50) && (dev->as99127f_smbus_addr)) {
smbus_write_byte_cmd(dev->as99127f_smbus_addr, reg, val); smbus_write_byte_cmd(dev->as99127f_smbus_addr, reg, val);
return 1; return 1;
} }

View File

@@ -229,6 +229,8 @@ machine_at_p3bf_init(const machine_t *model)
}; };
if (model->cpu[cpu_manufacturer].cpus[cpu_effective].cpu_type == CPU_PENTIUM2) if (model->cpu[cpu_manufacturer].cpus[cpu_effective].cpu_type == CPU_PENTIUM2)
machine_hwm.voltages[0] = 2800; /* set higher VCORE (2.8V) for Klamath */ machine_hwm.voltages[0] = 2800; /* set higher VCORE (2.8V) for Klamath */
else if (model->cpu[cpu_manufacturer].cpus[cpu_effective].cpu_type == CPU_CYRIX3S)
machine_hwm.voltages[0] = 2800; /* P3B-F specific issue: it believes the Cyrix III is a Klamath, and therefore expects a toasty 2.8V */
hwm_set_values(machine_hwm); hwm_set_values(machine_hwm);
device_add(&as99127f_device); device_add(&as99127f_device);