Add detection support for quite a number of SMSC Super I/Os. Also, add
dump support for the SMSC DME1737 and the ASUS A8000. Random minor fixes. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2803 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
6b4ad4304a
commit
0f86732a5e
|
@ -239,10 +239,7 @@ const static struct superio_registers reg_table[] = {
|
|||
};
|
||||
|
||||
/**
|
||||
* Enable configuration sequence (ITE uses this for newer IT87[012]xF).
|
||||
*
|
||||
* IT871[01]F uses 0x87, 0x87 -> Fintek detection should handle it
|
||||
* IT8708F uses 0x87, 0x87 -> Fintek detection should handle it
|
||||
* IT871[01]F and IT8708F use 0x87, 0x87
|
||||
* IT8761F uses 0x87, 0x61, 0x55, 0x55/0xaa
|
||||
* IT86xxF series uses different ports
|
||||
* IT8661F uses 0x86, 0x61, 0x55/0xaa, 0x55/0xaa and 32 more writes
|
||||
|
|
|
@ -20,8 +20,11 @@
|
|||
|
||||
#include "superiotool.h"
|
||||
|
||||
#define DEVICE_ID_REG 0x0d
|
||||
#define DEVICE_REV_REG 0x0e
|
||||
#define DEVICE_ID_REG_OLD 0x0d
|
||||
#define DEVICE_REV_REG_OLD 0x0e
|
||||
|
||||
#define DEVICE_ID_REG 0x20
|
||||
#define DEVICE_REV_REG 0x21
|
||||
|
||||
const static struct superio_registers reg_table[] = {
|
||||
{0x28, "FDC37N769", {
|
||||
|
@ -37,6 +40,82 @@ const static struct superio_registers reg_table[] = {
|
|||
0x80,0x00,0x3c,RSVD,RSVD,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,RSVD,0x00,0x00,0x03,0x00,0x00,EOT}},
|
||||
{EOT}}},
|
||||
{0x42, "FDC37B80x", {
|
||||
{EOT}}},
|
||||
{0x44, "FDC37B78x", {
|
||||
{EOT}}},
|
||||
{0x4c, "FDC37B72x", {
|
||||
{EOT}}},
|
||||
{0x4d, "FDC37M81x", {
|
||||
{EOT}}},
|
||||
{0x47, "FDC37M60x", {
|
||||
{EOT}}},
|
||||
{0x51, "LPC47B27x", {
|
||||
{EOT}}},
|
||||
{0x59, "LPC47M10x", {
|
||||
{EOT}}},
|
||||
{0x60, "LPC47M15x", {
|
||||
{EOT}}},
|
||||
{0x62, "LPC47S45x", {
|
||||
{EOT}}},
|
||||
{0x6f, "LPC47B397", {
|
||||
{EOT}}},
|
||||
{0x77, "A8000", { /* ASUS A8000, a rebranded DME1737(?) */
|
||||
{NOLDN, NULL,
|
||||
{0x03,0x07,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,
|
||||
0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
|
||||
{RSVD,0x00,0x77,NANA,0x00,RSVD,0x44,MISC,MISC,RSVD,
|
||||
NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
|
||||
{0x0, "Floppy",
|
||||
{0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
|
||||
0xf5,EOT},
|
||||
{0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
|
||||
0x00,EOT}},
|
||||
{0x3, "Parallel port",
|
||||
{0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
|
||||
{0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
|
||||
{0x4, "COM1",
|
||||
{0x30,0x60,0x61,0x70,0xf0,EOT},
|
||||
{0x00,0x00,0x00,0x00,0x00,EOT}},
|
||||
{0x5, "COM2",
|
||||
{0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
|
||||
{0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
|
||||
{0x7, "Keyboard",
|
||||
{0x30,0x70,0x72,0xf0,EOT},
|
||||
{0x00,0x00,0x00,0x00,EOT}},
|
||||
{0xa, "Runtime registers",
|
||||
{0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
|
||||
{0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}},
|
||||
{EOT}}},
|
||||
{0x78, "DME1737", {
|
||||
{NOLDN, NULL,
|
||||
{0x03,0x07,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,
|
||||
0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
|
||||
{RSVD,0x00,0x77,NANA,0x00,RSVD,0x44,MISC,MISC,RSVD,
|
||||
NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
|
||||
{0x0, "Floppy",
|
||||
{0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
|
||||
0xf5,EOT},
|
||||
{0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
|
||||
0x00,EOT}},
|
||||
{0x3, "Parallel port",
|
||||
{0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
|
||||
{0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
|
||||
{0x4, "COM1",
|
||||
{0x30,0x60,0x61,0x70,0xf0,EOT},
|
||||
{0x00,0x00,0x00,0x00,0x00,EOT}},
|
||||
{0x5, "COM2",
|
||||
{0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
|
||||
{0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
|
||||
{0x7, "Keyboard",
|
||||
{0x30,0x70,0x72,0xf0,EOT},
|
||||
{0x00,0x00,0x00,0x00,EOT}},
|
||||
{0xa, "Runtime registers",
|
||||
{0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
|
||||
{0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}},
|
||||
{EOT}}},
|
||||
{0x81, "SCH5307", {
|
||||
{EOT}}},
|
||||
{EOT}
|
||||
};
|
||||
|
||||
|
@ -56,6 +135,14 @@ void probe_idregs_smsc(uint16_t port)
|
|||
|
||||
enter_conf_mode_smsc(port);
|
||||
|
||||
/* Check for older SMSC Super I/Os. */
|
||||
id = regval(port, DEVICE_ID_REG_OLD);
|
||||
rev = regval(port, DEVICE_REV_REG_OLD);
|
||||
|
||||
if (superio_unknown(reg_table, id))
|
||||
no_superio_found(port);
|
||||
|
||||
/* Check for newer SMSC Super I/Os. */
|
||||
id = regval(port, DEVICE_ID_REG);
|
||||
rev = regval(port, DEVICE_REV_REG);
|
||||
|
||||
|
@ -65,10 +152,11 @@ void probe_idregs_smsc(uint16_t port)
|
|||
return;
|
||||
}
|
||||
|
||||
printf("Found SMSC %s (id=0x%02x, rev=0x%02x) at port=0x%x\n",
|
||||
get_superio_name(reg_table, id), id, rev, port);
|
||||
printf("Found %s %s (id=0x%02x, rev=0x%02x) at port=0x%x\n",
|
||||
(id == 0x77 ? "ASUS" : "SMSC"), get_superio_name(reg_table, id),
|
||||
id, rev, port);
|
||||
|
||||
dump_superio("SMSC", reg_table, port, id);
|
||||
dump_superio((id == 0x77 ? "ASUS" : "SMSC"), reg_table, port, id);
|
||||
dump_superio_readable(port); /* TODO */
|
||||
|
||||
exit_conf_mode_smsc(port);
|
||||
|
|
|
@ -52,7 +52,7 @@ and print its vendor, name, ID, version, and config port.\n"
|
|||
#define LDNSIZE (MAXLDN + 3) /* Biggest LDN + 0 + NOLDN + EOT */
|
||||
#define MAXNUMIDX 70 /* Maximum number of indexes */
|
||||
#define IDXSIZE (MAXNUMIDX + 1)
|
||||
#define MAXNUMPORTS (2 + 1) /* Maximum number of Super I/O ports */
|
||||
#define MAXNUMPORTS (4 + 1) /* Maximum number of Super I/O ports */
|
||||
|
||||
/* Command line parameters. */
|
||||
extern int dump, dump_readable, verbose;
|
||||
|
@ -101,11 +101,11 @@ const static struct {
|
|||
void (*probe_idregs) (uint16_t port);
|
||||
int ports[MAXNUMPORTS]; /* Signed, as we need EOT. */
|
||||
} superio_ports_table[] = {
|
||||
{probe_idregs_simple, {0x2e, 0x4e, EOT}},
|
||||
{probe_idregs_fintek, {0x2e, 0x4e, EOT}},
|
||||
{probe_idregs_ite, {0x2e, 0x4e, EOT}},
|
||||
{probe_idregs_smsc, {0x3f0, 0x370, EOT}},
|
||||
{probe_idregs_winbond, {0x2e, 0x4e, EOT}},
|
||||
{probe_idregs_simple, {0x2e, 0x4e, EOT}},
|
||||
{probe_idregs_fintek, {0x2e, 0x4e, EOT}},
|
||||
{probe_idregs_ite, {0x2e, 0x4e, EOT}},
|
||||
{probe_idregs_smsc, {0x2e, 0x4e, 0x3f0, 0x370, EOT}},
|
||||
{probe_idregs_winbond, {0x2e, 0x4e, EOT}},
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue