From patchwork Thu Apr 12 11:09:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 7760 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 8D5CC23E4C for ; Thu, 12 Apr 2012 11:09:47 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 429AEA18444 for ; Thu, 12 Apr 2012 11:09:47 +0000 (UTC) Received: by iage36 with SMTP id e36so3623900iag.11 for ; Thu, 12 Apr 2012 04:09:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=nJ8ypuzNgXRO+2y092mm0Pa+i5k6wikeNCjjnglTrLg=; b=I6QnZxTpOzpaXCEvOHGFOtoiD7WrMao1kr8fYra8WMqRaGW6Gu8TA20zgaAPrFu1pD 4cwPGzbQmRI7Sz41qjh9jHF5sDoyYxzzM06O6DNBO0lEMTcec6hJk2+9HMRj2Bp+O1W6 6blUTuaKeaUhF8QTn4YFD19xrqtb9ih50bjiuUFNlPjgARJvNeMCg/m3SK65Fr0gXxSX pNSj2Bm9JfO/bTT9Xe/L76vBK5EPYSMJJWpGlFcR6C+yyp+m8vZ+V0XZLzLhk7i5ta9V mhngXHVqnakigRF8gyyOJqDpoMRCLgqQH0NObJZAXhQ7TyZhwAFExdj6kCfi4+yRgWWp iJQg== Received: by 10.50.188.199 with SMTP id gc7mr1984684igc.40.1334228986742; Thu, 12 Apr 2012 04:09:46 -0700 (PDT) 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.231.70.69 with SMTP id c5csp257482ibj; Thu, 12 Apr 2012 04:09:44 -0700 (PDT) Received: by 10.180.104.230 with SMTP id gh6mr4838781wib.22.1334228975351; Thu, 12 Apr 2012 04:09:35 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id eu18si21931026wid.13.2012.04.12.04.09.34 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Apr 2012 04:09:35 -0700 (PDT) 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 1SIHu6-0006ia-Hi; Thu, 12 Apr 2012 12:09:30 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Paul Brook Subject: [PATCH] hw/arm_mptimer: Reset the qemu_timer at reset Date: Thu, 12 Apr 2012 12:09:30 +0100 Message-Id: <1334228970-25799-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQn+qGOlEZXbRE5DMVq8OQLKBfzNOo9vJ/naItSZtW0GQrAqFNZxRSxAo6q8iMX5BBOApG2/ On reset of the mpcore timer/watchdog block we need to delete the qemu_timer in case it was running. Signed-off-by: Peter Maydell --- hw/arm_mptimer.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/arm_mptimer.c b/hw/arm_mptimer.c index df7fb4c..fe43cbb 100644 --- a/hw/arm_mptimer.c +++ b/hw/arm_mptimer.c @@ -228,6 +228,9 @@ static void timerblock_reset(timerblock *tb) tb->control = 0; tb->status = 0; tb->tick = 0; + if (tb->timer) { + qemu_del_timer(tb->timer); + } } static void arm_mptimer_reset(DeviceState *dev)