From faaea998591338910657153780c090b204ee830e Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Wed, 23 Oct 2019 08:58:30 +0200 Subject: mb/lenovo/x201/smihandler: Remove mainboard_io_trap_handler function An io_trap_handler on this board is unused in SMM. Change-Id: Ie922f8f1a10495ae887221735c96807261508041 Signed-off-by: Peter Lemenkov Reviewed-on: https://review.coreboot.org/c/coreboot/+/36252 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph --- src/mainboard/lenovo/x201/smihandler.c | 39 ++++++++-------------------------- 1 file changed, 9 insertions(+), 30 deletions(-) (limited to 'src/mainboard/lenovo/x201/smihandler.c') diff --git a/src/mainboard/lenovo/x201/smihandler.c b/src/mainboard/lenovo/x201/smihandler.c index c9c52abc1d..4ba10b47cd 100644 --- a/src/mainboard/lenovo/x201/smihandler.c +++ b/src/mainboard/lenovo/x201/smihandler.c @@ -24,38 +24,10 @@ #include #include #include "dock.h" -#include "smi.h" #define GPE_EC_SCI 1 #define GPE_EC_WAKE 13 -int mainboard_io_trap_handler(int smif) -{ - switch (smif) { - case SMI_DOCK_CONNECT: - ec_clr_bit(0x03, 2); - udelay(250000); - dock_connect(); - ec_set_bit(0x03, 2); - /* set dock LED to indicate status */ - ec_write(0x0c, 0x09); - ec_write(0x0c, 0x88); - break; - - case SMI_DOCK_DISCONNECT: - ec_clr_bit(0x03, 2); - dock_disconnect(); - break; - - default: - return 0; - } - - /* On success, the IO Trap Handler returns 1 - * On failure, the IO Trap Handler returns a value != 1 */ - return 1; -} - static void mainboard_smi_handle_ec_sci(void) { u8 status = inb(EC_SC); @@ -74,12 +46,19 @@ static void mainboard_smi_handle_ec_sci(void) /* Power loss */ case 0x50: /* Undock Key */ - mainboard_io_trap_handler(SMI_DOCK_DISCONNECT); + ec_clr_bit(0x03, 2); + dock_disconnect(); break; case 0x37: case 0x58: /* Dock Event */ - mainboard_io_trap_handler(SMI_DOCK_CONNECT); + ec_clr_bit(0x03, 2); + udelay(250000); + dock_connect(); + ec_set_bit(0x03, 2); + /* set dock LED to indicate status */ + ec_write(0x0c, 0x09); + ec_write(0x0c, 0x88); break; default: break; -- cgit v1.2.3