From patchwork Thu Dec 15 18:58:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 5783 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0CCA123E04 for ; Thu, 15 Dec 2011 18:58:30 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id F391FA188FD for ; Thu, 15 Dec 2011 18:58:29 +0000 (UTC) Received: by eaak10 with SMTP id k10so2651939eaa.11 for ; Thu, 15 Dec 2011 10:58:29 -0800 (PST) Received: by 10.205.120.135 with SMTP id fy7mr2091906bkc.54.1323975509788; Thu, 15 Dec 2011 10:58:29 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.129.2 with SMTP id hg2cs50496bkc; Thu, 15 Dec 2011 10:58:29 -0800 (PST) Received: by 10.152.125.196 with SMTP id ms4mr4848639lab.50.1323975508260; Thu, 15 Dec 2011 10:58:28 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id a21si4499948wed.141.2011.12.15.10.58.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Dec 2011 10:58:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1RbGVe-0005iK-Ey; Thu, 15 Dec 2011 18:58:26 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, qemu-trivial@nongnu.org Subject: [PATCH] stellaris: Calculate system clock period on reset Date: Thu, 15 Dec 2011 18:58:26 +0000 Message-Id: <1323975506-21941-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 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 --- hw/stellaris.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 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)