Patchwork [03/17] stellaris: Calculate system clock period on reset

login
register
mail settings
Submitter Stefan Hajnoczi
Date Dec. 19, 2011, 11:12 a.m.
Message ID <1324293158-25433-4-git-send-email-stefanha@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/132190/
State New
Headers show

Comments

Stefan Hajnoczi - Dec. 19, 2011, 11:12 a.m.
From: Peter Maydell <peter.maydell@linaro.org>

Calculate the system clock period on reset; otherwise it remains
set to the default value of zero and attempting to use it provokes
a hang. This is one of the issues noted in LP:696094.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 hw/stellaris.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/stellaris.c b/hw/stellaris.c
index ce62a98..7a73074 100644
--- a/hw/stellaris.c
+++ b/hw/stellaris.c
@@ -621,6 +621,7 @@  static void ssys_reset(void *opaque)
     s->rcgc[0] = 1;
     s->scgc[0] = 1;
     s->dcgc[0] = 1;
+    ssys_calculate_system_clock(s);
 }
 
 static int stellaris_sys_post_load(void *opaque, int version_id)