summaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo/x201
diff options
context:
space:
mode:
authorBill XIE <persmule@hardenedlinux.org>2019-10-28 00:16:05 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-11-12 08:26:42 +0000
commit72f13e534bed0be4a3bc0999dc2fe772c322114f (patch)
tree0e5978ba8d6d6d2f5d60f20b32f5d4f764b3ebc1 /src/mainboard/lenovo/x201
parent9764bc126ea8718cdc723714d8355e51e71aa65f (diff)
downloadcoreboot-72f13e534bed0be4a3bc0999dc2fe772c322114f.tar.xz
ec/lenovo/h8: Make dock init in ramstage fully mainboard-specific
Discussed in CB:36093, in the past many lenovo boards need to declare an empty h8_mainboard_init_dock() to satisfy h8.c. Now the confusing H8_DOCK_EARLY_INIT might be retired, and if a mainboard needs dock init (done with h8_mainboard_init_dock() in the past) in ramstage, (discussed in CB:4294 where H8_DOCK_EARLY_INIT is introduced) it can just do it in its own chip_ops.enable_dev function. Tested on X200. Testing on other affected targets may be necessary. Change-Id: I5737406d1f6cb6e91b2e2fa349a206a3dba988d1 Signed-off-by: Bill XIE <persmule@hardenedlinux.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36385 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/mainboard/lenovo/x201')
-rw-r--r--src/mainboard/lenovo/x201/dock.c2
-rw-r--r--src/mainboard/lenovo/x201/dock.h2
-rw-r--r--src/mainboard/lenovo/x201/mainboard.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/mainboard/lenovo/x201/dock.c b/src/mainboard/lenovo/x201/dock.c
index 652a144104..58510ced89 100644
--- a/src/mainboard/lenovo/x201/dock.c
+++ b/src/mainboard/lenovo/x201/dock.c
@@ -22,7 +22,7 @@
#include <ec/lenovo/h8/h8.h>
#include <ec/acpi/ec.h>
-void h8_mainboard_init_dock(void)
+void init_dock(void)
{
if (dock_present()) {
printk(BIOS_DEBUG, "dock is connected\n");
diff --git a/src/mainboard/lenovo/x201/dock.h b/src/mainboard/lenovo/x201/dock.h
index 4cd8c857a8..6a08d81836 100644
--- a/src/mainboard/lenovo/x201/dock.h
+++ b/src/mainboard/lenovo/x201/dock.h
@@ -15,7 +15,7 @@
#ifndef THINKPAD_X201_DOCK_H
#define THINKPAD_X201_DOCK_H
-
+void init_dock(void);
void dock_connect(void);
void dock_disconnect(void);
int dock_present(void);
diff --git a/src/mainboard/lenovo/x201/mainboard.c b/src/mainboard/lenovo/x201/mainboard.c
index c021db185c..a403237e27 100644
--- a/src/mainboard/lenovo/x201/mainboard.c
+++ b/src/mainboard/lenovo/x201/mainboard.c
@@ -42,6 +42,8 @@ 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 = {