Decouple the ITE code from fintek.c, it doesn't belong there.
Add common 'enter configuration mode' function for most Winbond/Fintek/ITE chips which use the 0x87 0x87 sequence for that reason. 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@2794 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
@@ -226,12 +226,10 @@ static void exit_conf_mode_ite(uint16_t port)
|
||||
regwrite(port, 0x02, 0x02);
|
||||
}
|
||||
|
||||
void probe_idregs_ite(uint16_t port)
|
||||
static void probe_idregs_ite_helper(uint16_t port)
|
||||
{
|
||||
uint16_t id, chipver;
|
||||
|
||||
enter_conf_mode_ite(port);
|
||||
|
||||
id = regval(port, CHIP_ID_BYTE1_REG) << 8;
|
||||
id |= regval(port, CHIP_ID_BYTE2_REG);
|
||||
chipver = regval(port, CHIP_VERSION_REG) & 0x0f; /* Only bits 3..0 */
|
||||
@@ -246,7 +244,16 @@ void probe_idregs_ite(uint16_t port)
|
||||
get_superio_name(reg_table, id), id, chipver, port);
|
||||
|
||||
dump_superio("ITE", reg_table, port, id);
|
||||
|
||||
exit_conf_mode_ite(port);
|
||||
}
|
||||
|
||||
void probe_idregs_ite(uint16_t port)
|
||||
{
|
||||
enter_conf_mode_ite(port);
|
||||
probe_idregs_ite_helper(port);
|
||||
exit_conf_mode_ite(port);
|
||||
|
||||
enter_conf_mode_winbond_fintek_ite_8787(port);
|
||||
probe_idregs_ite_helper(port);
|
||||
exit_conf_mode_winbond_fintek_ite_8787(port);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user