aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu-0.12.4/arm_timer-fix-oneshot-mode.patch
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2010-11-30 11:51:46 -0500
committerSaul Wold <Saul.Wold@intel.com>2010-12-10 22:01:38 -0800
commitaac5f5c7883595e55e35474ec08033444e13f710 (patch)
treef287e066b12b3034932669845ce027b3ceb1d77a /meta/recipes-devtools/qemu/qemu-0.12.4/arm_timer-fix-oneshot-mode.patch
parent48d00ad8d5134b5bf3215df4faca7c7fd01154eb (diff)
downloadopenembedded-core-contrib-aac5f5c7883595e55e35474ec08033444e13f710.tar.gz
qemu: update arm timer handling
commit e388771458b4ff3ad81ab70e390b24d069647da4 in the upstream kernel factored/cleaned the SP804 timer code. This commit exposed issues in the qemu timer emulation that was dependent on the old behaviour. As a result, no kernel past 2.6.34 would boot on qemu-system-arm. The quick fix is to backport two patches from the latest qemu repositories that fix the timer handling under emulation. Long term, these will be dropped when qemu is upreved. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu-0.12.4/arm_timer-fix-oneshot-mode.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/arm_timer-fix-oneshot-mode.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/arm_timer-fix-oneshot-mode.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/arm_timer-fix-oneshot-mode.patch
new file mode 100644
index 0000000000..530736c4ca
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/arm_timer-fix-oneshot-mode.patch
@@ -0,0 +1,32 @@
+From a9cf98d939c4f6539fad7e7d812ea16d96ba3dc9 Mon Sep 17 00:00:00 2001
+From: Rabin Vincent <rabin@rab.in>
+Date: Sun, 2 May 2010 15:20:52 +0530
+Subject: [PATCH] arm_timer: fix oneshot mode
+
+commit id: a9cf98d939c4f6539fad7e7d812ea16d96ba3dc9 in git://git.sv.gnu.org/qemu.git
+
+In oneshot mode, the delta needs to come from the TimerLoad register,
+not the maximum limit.
+
+Signed-off-by: Rabin Vincent <rabin@rab.in>
+Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
+---
+ hw/arm_timer.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/hw/arm_timer.c b/hw/arm_timer.c
+index 5b6947a..9073ffc 100644
+--- a/hw/arm_timer.c
++++ b/hw/arm_timer.c
+@@ -71,7 +71,7 @@ static void arm_timer_recalibrate(arm_timer_state *s, int reload)
+ {
+ uint32_t limit;
+
+- if ((s->control & TIMER_CTRL_PERIODIC) == 0) {
++ if ((s->control & (TIMER_CTRL_PERIODIC | TIMER_CTRL_ONESHOT)) == 0) {
+ /* Free running. */
+ if (s->control & TIMER_CTRL_32BIT)
+ limit = 0xffffffff;
+--
+1.6.5.2
+