Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/superio/superio.c
Show First 20 Lines • Show All 264 Lines • ▼ Show 20 Lines | |||||
const struct sio_device ite_devices[] = { | const struct sio_device ite_devices[] = { | ||||
{ .ldn = 4, .type = SUPERIO_DEV_HWM }, | { .ldn = 4, .type = SUPERIO_DEV_HWM }, | ||||
{ .ldn = 7, .type = SUPERIO_DEV_WDT }, | { .ldn = 7, .type = SUPERIO_DEV_WDT }, | ||||
{ .type = SUPERIO_DEV_NONE }, | { .type = SUPERIO_DEV_NONE }, | ||||
}; | }; | ||||
const struct sio_device nvt_devices[] = { | const struct sio_device nvt_devices[] = { | ||||
{ .ldn = 8, .type = SUPERIO_DEV_WDT }, | { .ldn = 8, .type = SUPERIO_DEV_WDT }, | ||||
jo_bruelltuete.com: i only know of the hardware monitor for my board. | |||||
{ .type = SUPERIO_DEV_NONE }, | { .type = SUPERIO_DEV_NONE }, | ||||
}; | }; | ||||
const struct sio_device nct5104_devices[] = { | const struct sio_device nct5104_devices[] = { | ||||
{ .ldn = 7, .type = SUPERIO_DEV_GPIO }, | { .ldn = 7, .type = SUPERIO_DEV_GPIO }, | ||||
{ .ldn = 8, .type = SUPERIO_DEV_WDT }, | { .ldn = 8, .type = SUPERIO_DEV_WDT }, | ||||
{ .ldn = 15, .type = SUPERIO_DEV_GPIO }, | { .ldn = 15, .type = SUPERIO_DEV_GPIO }, | ||||
{ .type = SUPERIO_DEV_NONE }, | { .type = SUPERIO_DEV_NONE }, | ||||
}; | }; | ||||
const struct sio_device fintek_devices[] = { | const struct sio_device fintek_devices[] = { | ||||
{ .ldn = 7, .type = SUPERIO_DEV_WDT }, | { .ldn = 7, .type = SUPERIO_DEV_WDT }, | ||||
{ .type = SUPERIO_DEV_NONE }, | { .type = SUPERIO_DEV_NONE }, | ||||
}; | }; | ||||
static const struct { | static const struct { | ||||
superio_vendor_t vendor; | superio_vendor_t vendor; | ||||
uint16_t devid; | uint16_t devid; | ||||
uint16_t mask; | uint16_t mask; | ||||
const char *descr; | const char *descr; | ||||
const struct sio_device *devices; | const struct sio_device *devices; | ||||
} superio_table[] = { | } superio_table[] = { | ||||
{ | { | ||||
.vendor = SUPERIO_VENDOR_ITE, .devid = 0x8613, | |||||
.devices = ite_devices, | |||||
}, | |||||
{ | |||||
.vendor = SUPERIO_VENDOR_ITE, .devid = 0x8712, | .vendor = SUPERIO_VENDOR_ITE, .devid = 0x8712, | ||||
.devices = ite_devices, | .devices = ite_devices, | ||||
}, | }, | ||||
{ | { | ||||
.vendor = SUPERIO_VENDOR_ITE, .devid = 0x8716, | .vendor = SUPERIO_VENDOR_ITE, .devid = 0x8716, | ||||
.devices = ite_devices, | .devices = ite_devices, | ||||
}, | }, | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 239 Lines • ▼ Show 20 Lines | superio_detect(device_t dev, bool claim, struct siosc *sc) | ||||
sc->known_devices = superio_table[i].devices; | sc->known_devices = superio_table[i].devices; | ||||
sc->io_res = res; | sc->io_res = res; | ||||
sc->io_rid = rid; | sc->io_rid = rid; | ||||
sc->io_port = port; | sc->io_port = port; | ||||
sc->devid = devid; | sc->devid = devid; | ||||
sc->revid = revid; | sc->revid = revid; | ||||
KASSERT(sc->vendor == SUPERIO_VENDOR_ITE || | KASSERT(sc->vendor == SUPERIO_VENDOR_ITE || | ||||
sc->vendor == SUPERIO_VENDOR_NUVOTON, | sc->vendor == SUPERIO_VENDOR_NUVOTON || | ||||
("Only ITE and Nuvoton SuperIO-s are supported")); | sc->vendor == SUPERIO_VENDOR_FINTEK, | ||||
("Only ITE, Nuvoton or Fintek SuperIO-s are supported")); | |||||
Done Inline Actionsis this still true? see line 448. jo_bruelltuete.com: is this still true? see line 448. | |||||
sc->ldn_reg = 0x07; | sc->ldn_reg = 0x07; | ||||
sc->enable_reg = 0x30; | sc->enable_reg = 0x30; | ||||
sc->current_ldn = 0xff; /* no device should have this */ | sc->current_ldn = 0xff; /* no device should have this */ | ||||
if (superio_table[i].descr != NULL) { | if (superio_table[i].descr != NULL) { | ||||
device_set_desc(dev, superio_table[i].descr); | device_set_desc(dev, superio_table[i].descr); | ||||
} else if (sc->vendor == SUPERIO_VENDOR_ITE) { | } else if (sc->vendor == SUPERIO_VENDOR_ITE) { | ||||
char descr[64]; | char descr[64]; | ||||
▲ Show 20 Lines • Show All 474 Lines • Show Last 20 Lines |
i only know of the hardware monitor for my board.