[coreboot-gerrit] New patch to review for coreboot: de92bc0 Introduce a config whether dock is inited in romstage or not

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Wed Nov 27 21:45:32 CET 2013


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4294

-gerrit

commit de92bc02ebc3e016f70fac1f2842ba6574e1c84b
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Wed Nov 27 21:36:25 2013 +0100

    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.
    
    Change-Id: If5072e3dec883a94cd2d5643a92f7f6c3c9feee9
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 src/ec/lenovo/h8/h8.c            | 12 ++----------
 src/ec/lenovo/h8/h8.h            |  4 ++++
 src/mainboard/lenovo/t60/Kconfig |  1 +
 src/mainboard/lenovo/x60/Kconfig |  1 +
 4 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index af2aab3..fdb4c8b 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -28,10 +28,6 @@
 #include <pc80/mc146818rtc.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)
@@ -167,12 +163,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_IN_ROMSTAGE)
+	h8_mainboard_init_dock ();
 #endif
 }
 
diff --git a/src/ec/lenovo/h8/h8.h b/src/ec/lenovo/h8/h8.h
index 7379fc7..c9dcffc 100644
--- a/src/ec/lenovo/h8/h8.h
+++ b/src/ec/lenovo/h8/h8.h
@@ -28,6 +28,10 @@ void h8_enable_event(int event);
 void h8_disable_event(int event);
 int h8_ultrabay_device_present(void);
 
+#if !IS_ENABLED (CONFIG_H8_DOCK_IN_ROMSTAGE)
+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 0f0670e..b5eda3c 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_IN_ROMSTAGE
 config MAINBOARD_DIR
 	string
 	default lenovo/t60
diff --git a/src/mainboard/lenovo/x60/Kconfig b/src/mainboard/lenovo/x60/Kconfig
index 72aeef8..788b02a 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_IN_ROMSTAGE
 
 config MAINBOARD_DIR
 	string



More information about the coreboot-gerrit mailing list