From 741a0dd89ce67d0fed9a7907bb77ed3ea9afba81 Mon Sep 17 00:00:00 2001
From: zbao <fishbaozi@gmail.com>
Date: Thu, 25 Jun 2015 16:58:53 -0400
Subject: x86 realmode: Set up the 8254 timer before running option rom

If the 8254 is not set up, the external graphics option rom
hangs and never returns.

The code is tested on AMD/bettong.

Change-Id: I0022de9d9a275a7d4b7a331ae7fcf793b9f4c5f5
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/10903
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
---
 src/device/oprom/realmode/x86.c | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src')

diff --git a/src/device/oprom/realmode/x86.c b/src/device/oprom/realmode/x86.c
index 14bcbc0134..796c9fea93 100644
--- a/src/device/oprom/realmode/x86.c
+++ b/src/device/oprom/realmode/x86.c
@@ -31,6 +31,7 @@
 #include <device/pci_ids.h>
 #include <lib/jpeg.h>
 #include <pc80/i8259.h>
+#include <pc80/i8254.h>
 #include <string.h>
 #include <vbe.h>
 
@@ -326,6 +327,7 @@ void run_bios(struct device *dev, unsigned long addr)
 	 * in some option roms.
 	 */
 	setup_i8259();
+	setup_i8254();
 
 	/* Set up some legacy information in the F segment */
 	setup_rombios();
-- 
cgit v1.2.3