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 <lemenkov@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36252 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
parent
dbed7865d3
commit
faaea99859
|
@ -1,22 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of the coreboot project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Sven Schnelle <svens@stackframe.org>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MAINBOARD_LENOVO_X60_SMI_H
|
|
||||||
#define MAINBOARD_LENOVO_X60_SMI_H
|
|
||||||
|
|
||||||
#define SMI_DOCK_CONNECT 0x01
|
|
||||||
#define SMI_DOCK_DISCONNECT 0x02
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -24,38 +24,10 @@
|
||||||
#include <ec/lenovo/h8/h8.h>
|
#include <ec/lenovo/h8/h8.h>
|
||||||
#include <delay.h>
|
#include <delay.h>
|
||||||
#include "dock.h"
|
#include "dock.h"
|
||||||
#include "smi.h"
|
|
||||||
|
|
||||||
#define GPE_EC_SCI 1
|
#define GPE_EC_SCI 1
|
||||||
#define GPE_EC_WAKE 13
|
#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)
|
static void mainboard_smi_handle_ec_sci(void)
|
||||||
{
|
{
|
||||||
u8 status = inb(EC_SC);
|
u8 status = inb(EC_SC);
|
||||||
|
@ -74,12 +46,19 @@ static void mainboard_smi_handle_ec_sci(void)
|
||||||
/* Power loss */
|
/* Power loss */
|
||||||
case 0x50:
|
case 0x50:
|
||||||
/* Undock Key */
|
/* Undock Key */
|
||||||
mainboard_io_trap_handler(SMI_DOCK_DISCONNECT);
|
ec_clr_bit(0x03, 2);
|
||||||
|
dock_disconnect();
|
||||||
break;
|
break;
|
||||||
case 0x37:
|
case 0x37:
|
||||||
case 0x58:
|
case 0x58:
|
||||||
/* Dock Event */
|
/* 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;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue