Make VIA 686 instantiate the integrated Super I/O and hardware monitor
This commit is contained in:
@@ -130,7 +130,7 @@ typedef struct _pipc_ {
|
||||
acpi_t *acpi;
|
||||
pipc_io_trap_t io_traps[TRAP_MAX];
|
||||
|
||||
void *gameport, *ac97;
|
||||
void *gameport, *ac97, *sio, *hwm;
|
||||
sb_t *sb;
|
||||
uint16_t midigame_base, sb_base, fmnmi_base;
|
||||
} pipc_t;
|
||||
@@ -956,7 +956,6 @@ pipc_write(int func, int addr, uint8_t val, void *priv)
|
||||
pipc_t *dev = (pipc_t *) priv;
|
||||
int c;
|
||||
uint8_t pm_func = dev->usb[1] ? 4 : 3;
|
||||
void *subdev;
|
||||
|
||||
if (func > dev->max_func)
|
||||
return;
|
||||
@@ -1046,8 +1045,8 @@ pipc_write(int func, int addr, uint8_t val, void *priv)
|
||||
case 0x50: case 0x51: case 0x52: case 0x85:
|
||||
dev->pci_isa_regs[addr] = val;
|
||||
/* Forward Super I/O-related registers to sio_vt82c686.c */
|
||||
if ((subdev = device_get_priv(&via_vt82c686_sio_device)))
|
||||
vt82c686_sio_write(addr, val, subdev);
|
||||
if (dev->sio)
|
||||
vt82c686_sio_write(addr, val, dev->sio);
|
||||
break;
|
||||
|
||||
case 0x54:
|
||||
@@ -1380,8 +1379,8 @@ pipc_write(int func, int addr, uint8_t val, void *priv)
|
||||
case 0x70: case 0x71: case 0x74:
|
||||
dev->power_regs[addr] = val;
|
||||
/* Forward hardware monitor-related registers to hwm_vt82c686.c */
|
||||
if ((subdev = device_get_priv(&via_vt82c686_hwm_device)))
|
||||
vt82c686_hwm_write(addr, val, subdev);
|
||||
if (dev->hwm)
|
||||
vt82c686_hwm_write(addr, val, dev->hwm);
|
||||
break;
|
||||
|
||||
case 0x80: case 0x81: case 0x84: /* 596A has the SMBus I/O base and enable bit here instead. */
|
||||
@@ -1579,6 +1578,9 @@ pipc_init(const device_t *info)
|
||||
sound_add_handler(sb_get_buffer_sbpro, dev->sb);
|
||||
|
||||
dev->gameport = gameport_add(&gameport_sio_device);
|
||||
|
||||
dev->sio = device_add(&via_vt82c686_sio_device);
|
||||
dev->hwm = device_add(&via_vt82c686_hwm_device);
|
||||
}
|
||||
|
||||
pipc_reset_hard(dev);
|
||||
|
@@ -418,7 +418,6 @@ machine_at_cuv4xls_init(const machine_t *model)
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&via_apro133a_device);
|
||||
device_add(&via_vt82c686b_device);
|
||||
device_add(&via_vt82c686_sio_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(ics9xxx_get(ICS9250_18));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
@@ -452,13 +451,11 @@ machine_at_6via90ap_init(const machine_t *model)
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
device_add(&via_apro133a_device);
|
||||
device_add(&via_vt82c686b_device);
|
||||
device_add(&via_vt82c686_sio_device);
|
||||
device_add(&via_vt82c686b_device); /* fans: CPU1, CPU2; temperatures: CPU, System, unused */
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(ics9xxx_get(ICS9250_18));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 1024);
|
||||
device_add(&via_vt82c686_hwm_device); /* fans: CPU1, CPU2; temperatures: CPU, System, unused */
|
||||
hwm_values.temperatures[0] += 2; /* CPU offset */
|
||||
hwm_values.temperatures[1] += 2; /* System offset */
|
||||
hwm_values.temperatures[2] = 0; /* unused */
|
||||
|
@@ -271,12 +271,10 @@ machine_at_ficva503a_init(const machine_t *model)
|
||||
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
|
||||
|
||||
device_add(&via_mvp3_device);
|
||||
device_add(&via_vt82c686a_device);
|
||||
device_add(&via_vt82c686a_device); /* fans: CPU1, Chassis; temperatures: CPU, System, unused */
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&via_vt82c686_sio_device);
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
device_add(&via_vt82c686_hwm_device); /* fans: CPU1, Chassis; temperatures: CPU, System, unused */
|
||||
hwm_values.temperatures[0] += 2; /* CPU offset */
|
||||
hwm_values.temperatures[1] += 2; /* System offset */
|
||||
hwm_values.temperatures[2] = 0; /* unused */
|
||||
|
Reference in New Issue
Block a user