summaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo/x201
diff options
context:
space:
mode:
authorBill XIE <persmule@hardenedlinux.org>2020-03-21 02:07:41 +0800
committerPatrick Georgi <pgeorgi@google.com>2020-05-13 08:47:04 +0000
commit4611ad8930f57aa0e394e476c613fae1a4931c13 (patch)
treec3bce913a5b37a8899ab208ee2c84724bbd144d9 /src/mainboard/lenovo/x201
parent702cf30e987ef07533ef589035d7256c0be3d52c (diff)
downloadcoreboot-4611ad8930f57aa0e394e476c613fae1a4931c13.tar.xz
ec/lenovo/h8: Reintroduce h8_mb_init() for specific boards
Mainboard specific dock-init mechanism introduced https://review.coreboot.org/c/coreboot/+/36093 works on most boards, but https://ticket.coreboot.org/issues/256 shows that some boards (e.g. x201 and t410) need communication with h8 EC to enable or disable dock, (in dock_connect() and dock_disconnect() respectively) so they must be done after the h8 EC is brought up, which is not garanteed in the above mainboard specific dock-init mechanism. This time, a hook function h8_mb_init() will be called at the end of h8_enable(). (in place of the ancient h8_mainboard_init_dock() removed in CB:36093) Its default implementation is a weak empty function, but could be overrided with a strong one for boards needing to perform actions which should be done after h8 EC is brought up. This should fix the regression detected in https://ticket.coreboot.org/issues/256 Change-Id: I3674fbfeab2ea2cd2a4453a8e77521157d553388 Signed-off-by: Bill XIE <persmule@hardenedlinux.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39708 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/mainboard/lenovo/x201')
-rw-r--r--src/mainboard/lenovo/x201/dock.c5
-rw-r--r--src/mainboard/lenovo/x201/mainboard.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/mainboard/lenovo/x201/dock.c b/src/mainboard/lenovo/x201/dock.c
index 258d8f8eaa..7354eeeb41 100644
--- a/src/mainboard/lenovo/x201/dock.c
+++ b/src/mainboard/lenovo/x201/dock.c
@@ -7,13 +7,14 @@
#include <ec/lenovo/h8/h8.h>
#include <ec/acpi/ec.h>
-void init_dock(void)
+void h8_mb_init(void)
{
if (dock_present()) {
printk(BIOS_DEBUG, "dock is connected\n");
dock_connect();
- } else
+ } else {
printk(BIOS_DEBUG, "dock is not connected\n");
+ }
}
void dock_connect(void)
diff --git a/src/mainboard/lenovo/x201/mainboard.c b/src/mainboard/lenovo/x201/mainboard.c
index c35536df2d..beb99385f5 100644
--- a/src/mainboard/lenovo/x201/mainboard.c
+++ b/src/mainboard/lenovo/x201/mainboard.c
@@ -25,8 +25,6 @@ static void mainboard_enable(struct device *dev)
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS,
GMA_INT15_PANEL_FIT_DEFAULT,
GMA_INT15_BOOT_DISPLAY_LFP, 2);
-
- init_dock();
}
struct chip_operations mainboard_ops = {