From f5e0fd888d4c33b5d5cd55f9ffa43407a416ade1 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Tue, 27 Nov 2012 12:26:52 +0100 Subject: roda/rk9: Fix for VGABIOS changes Forgot to update the rk9 for the unified VGABIOS handling. This applies to rk9 what is done for other boards in commits 3c84261e84318708c9c16ee5df5c2549c609dd0a d5d340695b84ef6351818236dc514cd9734e87b1 Change-Id: I892b7d81927e277778c1c5251d27416fa79c9868 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/1924 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/roda/rk9/mainboard.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/src/mainboard/roda/rk9/mainboard.c b/src/mainboard/roda/rk9/mainboard.c index 5b4285c6dc..2d50e545db 100644 --- a/src/mainboard/roda/rk9/mainboard.c +++ b/src/mainboard/roda/rk9/mainboard.c @@ -23,7 +23,8 @@ //#include #include #include -#if CONFIG_PCI_OPTION_ROM_RUN_YABEL +#if CONFIG_VGA_ROM_RUN +#include #include #endif #include @@ -36,7 +37,7 @@ #endif -#if CONFIG_PCI_OPTION_ROM_RUN_YABEL +#if CONFIG_VGA_ROM_RUN static int int15_handler(void) { enum { @@ -57,16 +58,16 @@ static int int15_handler(void) PANEL_FIT_GFX_STRETCH = (1 << 2), }; - switch (M.x86.R_AX) { + switch (X86_AX) { case 0x5f34: /* Set Panel Fitting Hook */ - M.x86.R_AX = 0x005f; - M.x86.R_CX = PANEL_FIT_CENTERING; + X86_AX = 0x005f; + X86_CX = PANEL_FIT_CENTERING; break; case 0x5f35: /* Boot Display Device Hook */ - M.x86.R_AX = 0x005f; - M.x86.R_CX = BOOT_DISPLAY_DEFAULT; /* Select automatically. */ + X86_AX = 0x005f; + X86_CX = BOOT_DISPLAY_DEFAULT; /* Select automatically. */ break; case 0x5f40: /* Boot Panel Type Hook */ @@ -75,8 +76,8 @@ static int int15_handler(void) /* LCD panel type is SIO GPIO40-43. It's controlled by a DIP switch but was always set to 4 while only values of 5 and 6 worked. */ - M.x86.R_AX = 0x005f; - M.x86.R_CX = (inb(0x60f) & 0x0f) + 1; + X86_AX = 0x005f; + X86_CX = (inb(0x60f) & 0x0f) + 1; break; case 0x5f70: /* Sandybridge boards return 0 here. */ @@ -89,7 +90,7 @@ static int int15_handler(void) /* Interrupt was not handled. */ printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n", __func__, - M.x86.R_AX, M.x86.R_BX, M.x86.R_CX, M.x86.R_DX); + X86_AX, X86_BX, X86_CX, X86_DX); return 0; } @@ -97,12 +98,6 @@ static int int15_handler(void) return 1; } -static void int15_install(void) -{ - typedef int (* yabel_handleIntFunc)(void); - extern yabel_handleIntFunc yabel_intFuncArray[256]; - yabel_intFuncArray[0x15] = int15_handler; -} #endif static void verb_setup(void) @@ -131,9 +126,9 @@ static void mainboard_enable(device_t dev) { ec_setup(); verb_setup(); -#if CONFIG_PCI_OPTION_ROM_RUN_YABEL// || CONFIG_PCI_OPTION_ROM_RUN_REALMODE +#if CONFIG_VGA_ROM_RUN /* Install custom int15 handler for VGA OPROM */ - int15_install(); + mainboard_interrupt_handlers(0x15, &int15_handler); #endif /* We have no driver for the embedded controller since the firmware -- cgit v1.2.3