diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2013-11-27 21:36:25 +0100 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-12-02 22:16:18 +0100 |
commit | 161e9cc56b6009068a2b690f0d5d073bbb228acc (patch) | |
tree | 248f85cd6b1a7c598b47f747ec95708d59039559 /src | |
parent | dfc0881272ebb7d865fefbb037f7545b37bf2be3 (diff) | |
download | coreboot-161e9cc56b6009068a2b690f0d5d073bbb228acc.tar.xz |
Introduce a config whether dock is inited in romstage or not
Instead of depending on exact mobo configure general characteristic whether
dock is configured in romstage or ramstage.
X60 and T60 have superio in dock so it needs to be inited to get serial, so
it should be inited in romstage.
On X201 there is nothing useful that early in boot but it's needed to init more
to get dock working, in particular EC init needs to be done first.
Change-Id: If5072e3dec883a94cd2d5643a92f7f6c3c9feee9
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/4294
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/lenovo/h8/Kconfig | 3 | ||||
-rw-r--r-- | src/ec/lenovo/h8/h8.c | 12 | ||||
-rw-r--r-- | src/ec/lenovo/h8/h8.h | 4 | ||||
-rw-r--r-- | src/mainboard/lenovo/t60/Kconfig | 1 | ||||
-rw-r--r-- | src/mainboard/lenovo/x60/Kconfig | 1 |
5 files changed, 11 insertions, 10 deletions
diff --git a/src/ec/lenovo/h8/Kconfig b/src/ec/lenovo/h8/Kconfig index 07bdb11a05..6a9d055161 100644 --- a/src/ec/lenovo/h8/Kconfig +++ b/src/ec/lenovo/h8/Kconfig @@ -1,3 +1,6 @@ config EC_LENOVO_H8 select EC_ACPI bool + +config H8_DOCK_EARLY_INIT + bool diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index 5f7060dcd6..d0a9ea956b 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -29,10 +29,6 @@ #include <string.h> #include <kconfig.h> -#if IS_ENABLED (CONFIG_BOARD_LENOVO_X201) -#include "mainboard/lenovo/x201/dock.h" -#endif - static void h8_bluetooth_enable(int on) { if (on) @@ -187,12 +183,8 @@ static void h8_enable(device_t dev) } h8_set_audio_mute(0); -#if IS_ENABLED (CONFIG_BOARD_LENOVO_X201) - if (dock_present()) { - printk(BIOS_DEBUG, "dock is connected\n"); - dock_connect(); - } else - printk(BIOS_DEBUG, "dock is not connected\n"); +#if !IS_ENABLED(CONFIG_H8_DOCK_EARLY_INIT) + h8_mainboard_init_dock (); #endif } diff --git a/src/ec/lenovo/h8/h8.h b/src/ec/lenovo/h8/h8.h index 061a213d05..dda3f659ad 100644 --- a/src/ec/lenovo/h8/h8.h +++ b/src/ec/lenovo/h8/h8.h @@ -29,6 +29,10 @@ void h8_disable_event(int event); int h8_ultrabay_device_present(void); u8 h8_build_id_and_function_spec_version(char *buf, u8 buf_len); +#if !IS_ENABLED (CONFIG_H8_DOCK_EARLY_INIT) +void h8_mainboard_init_dock (void); +#endif + /* EC registers */ #define H8_CONFIG0 0x00 #define H8_CONFIG0_EVENTS_ENABLE 0x02 diff --git a/src/mainboard/lenovo/t60/Kconfig b/src/mainboard/lenovo/t60/Kconfig index 0f0670e633..303f55a3ef 100644 --- a/src/mainboard/lenovo/t60/Kconfig +++ b/src/mainboard/lenovo/t60/Kconfig @@ -22,6 +22,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy select HAVE_ACPI_TABLES select HAVE_ACPI_RESUME select EARLY_CBMEM_INIT + select H8_DOCK_EARLY_INIT config MAINBOARD_DIR string default lenovo/t60 diff --git a/src/mainboard/lenovo/x60/Kconfig b/src/mainboard/lenovo/x60/Kconfig index 72aeef8f5d..7ed2665f04 100644 --- a/src/mainboard/lenovo/x60/Kconfig +++ b/src/mainboard/lenovo/x60/Kconfig @@ -25,6 +25,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy select USE_OPTION_TABLE select MAINBOARD_HAS_NATIVE_VGA_INIT select EARLY_CBMEM_INIT + select H8_DOCK_EARLY_INIT config MAINBOARD_DIR string |