summaryrefslogtreecommitdiff
path: root/internal.c
diff options
context:
space:
mode:
authorhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-12-22 23:42:04 +0000
committerhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-12-22 23:42:04 +0000
commit69bb848f87d91d51cb8bf6890f3c4c34b8a368b9 (patch)
tree78dd44d70ae4c3bd0a80fbb959499d06becaa42f /internal.c
parentdfe32dee250a28968f398f983c73a9fa0ec1f717 (diff)
downloadflashrom-69bb848f87d91d51cb8bf6890f3c4c34b8a368b9.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. 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@813 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'internal.c')
-rw-r--r--internal.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal.c b/internal.c
index cfb83d7..69624a0 100644
--- a/internal.c
+++ b/internal.c
@@ -125,6 +125,17 @@ void release_io_perms(void)
}
#if INTERNAL_SUPPORT == 1
+struct superio superio = {};
+
+void probe_superio(void)
+{
+ superio = probe_superio_ite();
+#if 0 /* Winbond SuperI/O code is not yet available. */
+ if (superio.vendor == SUPERIO_VENDOR_NONE)
+ superio = probe_superio_winbond();
+#endif
+}
+
int internal_init(void)
{
int ret = 0;
@@ -142,6 +153,9 @@ int internal_init(void)
*/
coreboot_init();
+ /* Probe for the SuperI/O chip and fill global struct superio. */
+ probe_superio();
+
/* try to enable it. Failure IS an option, since not all motherboards
* really need this to be done, etc., etc.
*/