summaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo/x220
diff options
context:
space:
mode:
authorNathaniel Roach <nroach44@gmail.com>2018-11-10 08:34:44 +0800
committerPatrick Georgi <pgeorgi@google.com>2018-12-06 11:59:22 +0000
commit4f4322dd68575402e099e2dfda057687388f064e (patch)
tree0d5539c721bb5f6015c3ac86bf81222d676ab3c6 /src/mainboard/lenovo/x220
parentd88cf5f0372aacc94db2b528fc33cf9ac12ebbc0 (diff)
lenovo/h8,thinkpads: Re-do USB Always On
Re-write the UAO handling code as it had stopped working (#171) (the flag was not getting read from the RTC properly in SMM) Remove the SMM code as it's not needed (but EC flag won't be set upon entering S3 now) Set the EC flags on boot the same way other flags are set Document bitwise operators for clarity Propagate changes to other Thinkpads (updated X201 to have 2 bits for the flag as it only had 1) Per Nicola Corna's previous commits, 0x0d is set for "AC only" "AC only" does exhibit different behaviour - the USB port is turned on a few seconds after entering S3, rather than < 1 sec, regardless of AC status Tested on X220 Change-Id: If812cd1ef8fb1a24d7fadbe834f574b40cbcd56a Signed-off-by: Nathaniel Roach <nroach44@gmail.com> Reviewed-on: https://review.coreboot.org/c/29565 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Diffstat (limited to 'src/mainboard/lenovo/x220')
-rw-r--r--src/mainboard/lenovo/x220/cmos.layout2
-rw-r--r--src/mainboard/lenovo/x220/smihandler.c2
2 files changed, 1 insertions, 3 deletions
diff --git a/src/mainboard/lenovo/x220/cmos.layout b/src/mainboard/lenovo/x220/cmos.layout
index c6e270afa0..d4a4ed3371 100644
--- a/src/mainboard/lenovo/x220/cmos.layout
+++ b/src/mainboard/lenovo/x220/cmos.layout
@@ -69,7 +69,7 @@ entries
418 1 e 1 sticky_fn
419 1 e 1 power_management_beeps
421 1 e 9 sata_mode
-422 1 e 12 usb_always_on
+422 2 e 12 usb_always_on
#423 1 r 1 unused
# coreboot config options: cpu
diff --git a/src/mainboard/lenovo/x220/smihandler.c b/src/mainboard/lenovo/x220/smihandler.c
index c967e4084e..150232f354 100644
--- a/src/mainboard/lenovo/x220/smihandler.c
+++ b/src/mainboard/lenovo/x220/smihandler.c
@@ -102,8 +102,6 @@ int mainboard_smi_apmc(u8 data)
void mainboard_smi_sleep(u8 slp_typ)
{
- h8_usb_always_on();
-
if (slp_typ == 3) {
u8 ec_wake = ec_read(0x32);
/* If EC wake events are enabled, enable wake on EC WAKE GPE. */