summaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo/x201
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/lenovo/x201')
-rw-r--r--src/mainboard/lenovo/x201/Kconfig1
-rw-r--r--src/mainboard/lenovo/x201/mainboard.c35
2 files changed, 3 insertions, 33 deletions
diff --git a/src/mainboard/lenovo/x201/Kconfig b/src/mainboard/lenovo/x201/Kconfig
index c82971f568..571f35eb4f 100644
--- a/src/mainboard/lenovo/x201/Kconfig
+++ b/src/mainboard/lenovo/x201/Kconfig
@@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select HAVE_MP_TABLE
select BOARD_ROMSIZE_KB_8192
select HAVE_ACPI_TABLES
+ select INTEL_INT15
select HAVE_ACPI_RESUME
select MAINBOARD_HAS_NATIVE_VGA_INIT
select MAINBOARD_HAS_NATIVE_VGA_INIT_TEXTMODECFG
diff --git a/src/mainboard/lenovo/x201/mainboard.c b/src/mainboard/lenovo/x201/mainboard.c
index fd11da8326..fdeddd4402 100644
--- a/src/mainboard/lenovo/x201/mainboard.c
+++ b/src/mainboard/lenovo/x201/mainboard.c
@@ -41,7 +41,7 @@
#include "dock.h"
#include "hda_verb.h"
#include <arch/x86/include/arch/acpigen.h>
-#include <x86emu/regs.h>
+#include <drivers/intel/gma/int15.h>
#include <arch/interrupt.h>
#include <pc80/keyboard.h>
#include <cpu/x86/lapic.h>
@@ -61,34 +61,6 @@ int get_cst_entries(acpi_cstate_t ** entries)
return ARRAY_SIZE(cst_entries);
}
-#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
-
-static int int15_handler(void)
-{
- switch ((X86_EAX & 0xffff)) {
- /* Get boot display. */
- case 0x5f35:
- X86_EAX = 0x5f;
- /* The flags are:
- 1 - VGA
- 4 - DisplayPort
- 8 - LCD
- */
- X86_ECX = 0x8;
-
- return 1;
- case 0x5f40:
- X86_EAX = 0x5f;
- X86_ECX = 0x2;
- return 1;
- default:
- printk(BIOS_WARNING, "Unknown INT15 function %04x!\n",
- X86_EAX & 0xffff);
- return 0;
- }
-}
-#endif
-
const char *smbios_mainboard_bios_version(void)
{
/* Satisfy thinkpad_acpi. */
@@ -172,10 +144,7 @@ static void mainboard_enable(device_t dev)
if (dev0 && pci_read_config32(dev0, SKPAD) == SKPAD_ACPI_S3_MAGIC)
ec_write(0x0c, 0xc7);
-#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
- /* Install custom int15 handler for VGA OPROM */
- mainboard_interrupt_handlers(0x15, &int15_handler);
-#endif
+ install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_LFP, 2);
verb_setup();
}