summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Lemenkov <lemenkov@gmail.com>2019-11-20 14:50:31 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-11-22 10:37:14 +0000
commit386d3418ef2af7f6d392994873e4fe2239f79d4a (patch)
tree3f7ffc5d8de6773c2ef45a0f2e41cce8c8db069a
parent9ea4c8a71ebad2aff593d6b6667510b79c4bab2a (diff)
mb/lenovo/{x201,x60}/smihandler: Use mdelay instead of udelay for large values
Change-Id: I7d20a850f8c2a1fcdee358c9e73d4c04eb3d7de8 Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37006 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/mainboard/lenovo/x201/smihandler.c6
-rw-r--r--src/mainboard/lenovo/x60/smihandler.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mainboard/lenovo/x201/smihandler.c b/src/mainboard/lenovo/x201/smihandler.c
index 4ba10b47cd..91cb0ce2d6 100644
--- a/src/mainboard/lenovo/x201/smihandler.c
+++ b/src/mainboard/lenovo/x201/smihandler.c
@@ -53,7 +53,7 @@ static void mainboard_smi_handle_ec_sci(void)
case 0x58:
/* Dock Event */
ec_clr_bit(0x03, 2);
- udelay(250000);
+ mdelay(250);
dock_connect();
ec_set_bit(0x03, 2);
/* set dock LED to indicate status */
@@ -101,9 +101,9 @@ void mainboard_smi_sleep(u8 slp_typ)
{
if (slp_typ == 3) {
u8 ec_wake = ec_read(0x32);
- /* If EC wake events are enabled, enable wake on EC WAKE GPE. */
+ /* If EC wake events are enabled, enable wake on EC WAKE GPE. */
if (ec_wake & 0x14) {
- /* Redirect EC WAKE GPE to SCI. */
+ /* Redirect EC WAKE GPE to SCI. */
gpi_route_interrupt(GPE_EC_WAKE, GPI_IS_SCI);
}
}
diff --git a/src/mainboard/lenovo/x60/smihandler.c b/src/mainboard/lenovo/x60/smihandler.c
index 0a2c7e2e6b..7aacc451c0 100644
--- a/src/mainboard/lenovo/x60/smihandler.c
+++ b/src/mainboard/lenovo/x60/smihandler.c
@@ -51,7 +51,7 @@ int mainboard_io_trap_handler(int smif)
switch (smif) {
case SMI_DOCK_CONNECT:
ec_clr_bit(0x03, 2);
- udelay(250000);
+ mdelay(250);
if (!dock_connect()) {
ec_set_bit(0x03, 2);
/* set dock LED to indicate status */