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>
This commit is contained in:
Bill XIE
2019-10-28 00:16:05 +08:00
committed by Patrick Georgi
parent 9764bc126e
commit 72f13e534b
29 changed files with 15 additions and 91 deletions

View File

@@ -44,7 +44,4 @@ config H8_HAS_PRIMARY_FN_KEYS
bool
default n
endif
config H8_DOCK_EARLY_INIT
bool
endif # EC_LENOVO_H8

View File

@@ -353,10 +353,6 @@ static void h8_enable(struct device *dev)
h8_charge_priority(val);
h8_set_audio_mute(0);
#if !CONFIG(H8_DOCK_EARLY_INIT)
h8_mainboard_init_dock();
#endif
}
struct chip_operations ec_lenovo_h8_ops = {

View File

@@ -36,8 +36,6 @@ int h8_ultrabay_device_present(void);
u8 h8_build_id_and_function_spec_version(char *buf, u8 buf_len);
void h8_usb_always_on(void);
void h8_mainboard_init_dock (void);
int h8_get_fn_key(void);
int h8_get_sense_ready(void);