| 204 | } |
| 205 | |
| 206 | void probe_idregs_microchip(uint16_t port) |
| 207 | { |
| 208 | probing_for("Microchip", "", port); |
| 209 | |
| 210 | enter_conf_mode_microchip(port); |
| 211 | |
| 212 | uint8_t legacy_id = regval(port, DEVICE_ID_REG_LEGACY); |
| 213 | if (legacy_id != 0xfe) { |
| 214 | if (verbose) |
| 215 | printf(NOTFOUND "legacy_id=0x%02x, expected 0xfe\n", legacy_id); |
| 216 | exit_conf_mode_microchip(port); |
| 217 | return; |
| 218 | } |
| 219 | |
| 220 | uint16_t id = (regval(port, DEVICE_ID_MSB) << 8) | regval(port, DEVICE_ID_LSB); |
| 221 | uint8_t subid = regval(port, DEVICE_SUBID); |
| 222 | uint8_t revision = regval(port, DEVICE_REVISION); |
| 223 | |
| 224 | uint16_t id_for_reg_table = id; |
| 225 | uint32_t id_subid = (id << 8) | subid; |
| 226 | // MEC142x parts use different numbers despite same family. |
| 227 | if (id_subid == 0x001310 || id_subid == 0x001510) |
| 228 | id_for_reg_table = 0x0011; // cheat a bit, they're compatible |
| 229 | |
| 230 | if (superio_unknown(reg_table, id_for_reg_table)) { |
| 231 | if (verbose) |
| 232 | printf(NOTFOUND "id=0x%04x, subid=0x%02x, rev=0x%02x\n", id, subid, revision); |
| 233 | exit_conf_mode_microchip(port); |
| 234 | return; |
| 235 | } |
| 236 | |
| 237 | printf("Found %s %s (id=0x%04x, subid=0x%02x, rev=0x%02x) at 0x%x\n", |
| 238 | get_superio_name(reg_table, id_for_reg_table), lookup_chip_name(id, subid), |
| 239 | id, subid, revision, port); |
| 240 | chip_found = 1; |
| 241 | |
| 242 | dump_superio("Microchip", reg_table, port, id_for_reg_table, LDN_SEL); |
| 243 | |
| 244 | exit_conf_mode_microchip(port); |
| 245 | } |
| 246 | |
| 247 | void print_microchip_chips(void) |
| 248 | { |
nothing calls this directly
no test coverage detected