From 14e100c9335e310b3e84763f29306392574a14f4 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Tue, 22 Dec 2009 23:42:04 +0000 Subject: 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 Acked-by: Luc Verhaegen Acked-by: Adrian Glaubitz --- internal.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'internal.c') 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. */ -- cgit v1.1