summaryrefslogtreecommitdiffstats
path: root/board_enable.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-12-22 23:42:04 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-12-22 23:42:04 +0000
commit14e100c9335e310b3e84763f29306392574a14f4 (patch)
tree78dd44d70ae4c3bd0a80fbb959499d06becaa42f /board_enable.c
parent72a9a02b3864fb730ae9a8cff35266633842e324 (diff)
downloadast2050-flashrom-14e100c9335e310b3e84763f29306392574a14f4.zip
ast2050-flashrom-14e100c9335e310b3e84763f29306392574a14f4.tar.gz
SuperI/O detection now happens unconditionally and before the chipset enable
We could run it after chipset enable, but it definitely has to happen before board enable because the board enable usually accesses the SuperI/O. With this patch, it is possible to add a struct superio to the board enable table for more accurate matching in case subsystem IDs are ambiguous. This patch focuses on the generic infrastructure aspect and on support for IT8712F/IT8716F. Thanks go to Adrian Glaubitz and Ward Vandewege for testing. Corresponding to flashrom svn r813. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Luc Verhaegen <libv@skynet.be> Acked-by: Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Diffstat (limited to 'board_enable.c')
-rw-r--r--board_enable.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/board_enable.c b/board_enable.c
index 9dd299e..716b77e 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -66,6 +66,35 @@ void sio_mask(uint16_t port, uint8_t reg, uint8_t data, uint8_t mask)
OUTB(tmp | (data & mask), port + 1);
}
+/* Not used yet. */
+#if 0
+static int enable_flash_decode_superio(void)
+{
+ int ret;
+ uint8_t tmp;
+
+ switch (superio.vendor) {
+ case SUPERIO_VENDOR_NONE:
+ ret = -1;
+ break;
+ case SUPERIO_VENDOR_ITE:
+ enter_conf_mode_ite(superio.port);
+ /* Enable flash mapping. Works for most old ITE style SuperI/O. */
+ tmp = sio_read(superio.port, 0x24);
+ tmp |= 0xfc;
+ sio_write(superio.port, 0x24, tmp);
+ exit_conf_mode_ite(superio.port);
+ ret = 0;
+ break;
+ default:
+ printf_debug("Unhandled SuperI/O type!\n");
+ ret = -1;
+ break;
+ }
+ return ret;
+}
+#endif
+
/**
* Winbond W83627HF: Raise GPIO24.
*
OpenPOWER on IntegriCloud