summaryrefslogtreecommitdiff
path: root/src/mainboard/apple/macbook21
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-09-01 01:41:37 +0200
committerVladimir Serbinenko <phcoder@gmail.com>2014-09-05 22:48:49 +0200
commita2a906e47a87acc3acdca0ee2790ff96409b9b46 (patch)
tree32bd54895f2c1f199d649ed96a2dd7f2e9a4e722 /src/mainboard/apple/macbook21
parenta4857052f756507e18a54beba704f183f128a057 (diff)
downloadcoreboot-a2a906e47a87acc3acdca0ee2790ff96409b9b46.tar.xz
Consolidate intel vga int15 hooks
Change-Id: I9366dded98bf15f6da44ce893dd10698ba09fd55 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/6820 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/mainboard/apple/macbook21')
-rw-r--r--src/mainboard/apple/macbook21/Kconfig1
-rw-r--r--src/mainboard/apple/macbook21/mainboard.c38
2 files changed, 3 insertions, 36 deletions
diff --git a/src/mainboard/apple/macbook21/Kconfig b/src/mainboard/apple/macbook21/Kconfig
index 871c16c737..a01d6b16ca 100644
--- a/src/mainboard/apple/macbook21/Kconfig
+++ b/src/mainboard/apple/macbook21/Kconfig
@@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select HAVE_MP_TABLE
select BOARD_ROMSIZE_KB_2048
select CHANNEL_XOR_RANDOMIZATION
+ select INTEL_INT15
select HAVE_ACPI_TABLES
select HAVE_ACPI_RESUME
select USE_OPTION_TABLE
diff --git a/src/mainboard/apple/macbook21/mainboard.c b/src/mainboard/apple/macbook21/mainboard.c
index b537f78175..846914cae2 100644
--- a/src/mainboard/apple/macbook21/mainboard.c
+++ b/src/mainboard/apple/macbook21/mainboard.c
@@ -33,42 +33,11 @@
#include <pc80/mc146818rtc.h>
#include <arch/x86/include/arch/acpigen.h>
#include <smbios.h>
-#include <x86emu/x86emu.h>
+#include <drivers/intel/gma/int15.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
#define PANEL INT15_5F35_CL_DISPLAY_DEFAULT
-#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
-static int int15_handler(void)
-{
- /* The right way to do this is to move this handler code into
- * the mainboard or northbridge code.
- * TODO: completely move to mainboards / chipsets.
- */
- printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
- __func__, X86_AX, X86_BX, X86_CX, X86_DX);
-
- switch (X86_AX) {
- case 0x5f35: /* Boot Display */
- X86_AX = 0x005f; // Success
- X86_CL = PANEL;
- break;
- case 0x5f40: /* Boot Panel Type */
- X86_AX = 0x005f; // Success
- X86_CL = 3;
- printk(BIOS_DEBUG, "DISPLAY=%x\n", X86_CL);
- break;
- default:
- /* Interrupt was not handled */
- printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
- return 0;
- }
-
- /* Interrupt handled */
- return 1;
-}
-#endif
-
int get_cst_entries(acpi_cstate_t **entries)
{
return 0;
@@ -76,10 +45,7 @@ int get_cst_entries(acpi_cstate_t **entries)
static void mainboard_init(device_t dev)
{
-#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, PANEL, 3);
}
static void mainboard_enable(device_t dev)