From a2a906e47a87acc3acdca0ee2790ff96409b9b46 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 1 Sep 2014 01:41:37 +0200 Subject: Consolidate intel vga int15 hooks Change-Id: I9366dded98bf15f6da44ce893dd10698ba09fd55 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/6820 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan --- src/mainboard/packardbell/ms2290/Kconfig | 1 + src/mainboard/packardbell/ms2290/mainboard.c | 35 ++-------------------------- 2 files changed, 3 insertions(+), 33 deletions(-) (limited to 'src/mainboard/packardbell/ms2290') diff --git a/src/mainboard/packardbell/ms2290/Kconfig b/src/mainboard/packardbell/ms2290/Kconfig index 20768d873a..f0b7538a1e 100644 --- a/src/mainboard/packardbell/ms2290/Kconfig +++ b/src/mainboard/packardbell/ms2290/Kconfig @@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy select HAVE_ACPI_TABLES select HAVE_ACPI_RESUME select MAINBOARD_HAS_NATIVE_VGA_INIT + select INTEL_INT15 select EC_ACPI select MAINBOARD_HAS_NATIVE_VGA_INIT_TEXTMODECFG diff --git a/src/mainboard/packardbell/ms2290/mainboard.c b/src/mainboard/packardbell/ms2290/mainboard.c index 62e7fd906d..5fff98d5c1 100644 --- a/src/mainboard/packardbell/ms2290/mainboard.c +++ b/src/mainboard/packardbell/ms2290/mainboard.c @@ -36,7 +36,7 @@ #include #include #if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE -#include +#include #include #endif #include @@ -58,34 +58,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 - /* Audio Setup */ static void verb_setup(void) @@ -160,10 +132,7 @@ static void mainboard_enable(device_t dev) pci_write_config8(dev_find_slot(0, PCI_DEVFN(0x1f, 0)), GPIO_CNTL, 0x10); -#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); /* This sneaked in here, because EasyNote has no SuperIO chip. */ -- cgit v1.2.3