Add support for the ITE IT8661F/IT8770F, IT8673F, and IT8671F/IT8687R.
[coreboot.git] / util / superiotool / superiotool.c
index 5ee383ce34882e4a5574aacdfadf69a943e385f7..10f225f6dcaa0b1de79797fbbfb17e4c624e61ae 100644 (file)
@@ -32,7 +32,7 @@ int chip_found = 0;
 uint8_t regval(uint16_t port, uint8_t reg)
 {
        outb(reg, port);
-       return inb(port + 1);
+       return inb(port + ((port == 0x3bd) ? 2 : 1)); /* 0x3bd is special. */
 }
 
 void regwrite(uint16_t port, uint8_t reg, uint8_t val)