From patchwork Sat Feb 8 15:58:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 24350 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DCAC620967 for ; Sat, 8 Feb 2014 15:59:27 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id h16sf20714782oag.8 for ; Sat, 08 Feb 2014 07:59:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=yWg2AohqZi+SM4M1x3lB3pApdNJrWe0PeB9MRmxd7BI=; b=XKwQ5KeWRWfJ+NnEMAi6rE4+veEUkf9Z+f2Rq1z8IGVrPOITjbbmip9N0a3UlyS57F SxGR388oPcho81kTvmFoLU6JsfzsviQjIbxQUILadauVpORlVR0krbWCuS1e4M3fmYhB V3Tlfl4i4MoCVfUgQW4cwLSsdR4DZN2DYAi415h1aXQYaiE3yWQBYhmz5F8kNRVInb/6 /OiXsQPA5k1z/ip+KWx4bXFTV1nJ41ityKd3e4ZFghxBzRXJaaKbqdIifteU9XSu9z3i 1kXF/9OPe53++G58CkelO+3VsAKXS9EGXolRX09Y3qi5vuDTb4g9ErNHi1ZceYslD19i tO9g== X-Gm-Message-State: ALoCoQkOtP1o12RSw7LbFVKMmvMfb+wJT5mNsyGDD6IUTuYwi/ACk56DBrFHw7YEQPg+cMo6t/rk X-Received: by 10.50.12.68 with SMTP id w4mr2478594igb.0.1391875166605; Sat, 08 Feb 2014 07:59:26 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.97.196 with SMTP id m62ls1472881qge.11.gmail; Sat, 08 Feb 2014 07:59:26 -0800 (PST) X-Received: by 10.220.139.136 with SMTP id e8mr176700vcu.34.1391875166500; Sat, 08 Feb 2014 07:59:26 -0800 (PST) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by mx.google.com with ESMTPS id si7si2611121vdc.115.2014.02.08.07.59.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 08 Feb 2014 07:59:26 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.51; Received: by mail-vb0-f51.google.com with SMTP id 11so3616674vbe.10 for ; Sat, 08 Feb 2014 07:59:26 -0800 (PST) X-Received: by 10.52.251.232 with SMTP id zn8mr297633vdc.41.1391875166407; Sat, 08 Feb 2014 07:59:26 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp40266vcz; Sat, 8 Feb 2014 07:59:25 -0800 (PST) X-Received: by 10.224.167.84 with SMTP id p20mr32570052qay.24.1391875165832; Sat, 08 Feb 2014 07:59:25 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p10si6139832qag.102.2014.02.08.07.59.25 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 08 Feb 2014 07:59:25 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:46987 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCAJR-0000Eo-GD for patch@linaro.org; Sat, 08 Feb 2014 10:59:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCAIS-0007TR-BB for qemu-devel@nongnu.org; Sat, 08 Feb 2014 10:58:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCAIR-0002uY-6G for qemu-devel@nongnu.org; Sat, 08 Feb 2014 10:58:24 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:45684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCAIR-0002tl-0X for qemu-devel@nongnu.org; Sat, 08 Feb 2014 10:58:23 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WCAIA-0003NQ-8B; Sat, 08 Feb 2014 15:58:06 +0000 From: Peter Maydell To: Anthony Liguori Date: Sat, 8 Feb 2014 15:58:04 +0000 Message-Id: <1391875084-12772-30-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1391875084-12772-1-git-send-email-peter.maydell@linaro.org> References: <1391875084-12772-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Blue Swirl , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PULL 29/29] arm/zynq: Add software system reset via SCLR X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Sebastian Huber Support software-driven system reset via the register in the SCLR. Signed-off-by: Sebastian Huber Reviewed-by: Peter Crosthwaite Signed-off-by: Peter Maydell --- hw/misc/zynq_slcr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c index e42a5b0..d1cc233 100644 --- a/hw/misc/zynq_slcr.c +++ b/hw/misc/zynq_slcr.c @@ -31,6 +31,8 @@ #define XILINX_LOCK_KEY 0x767b #define XILINX_UNLOCK_KEY 0xdf0d +#define R_PSS_RST_CTRL_SOFT_RST 0x1 + typedef enum { ARM_PLL_CTRL, DDR_PLL_CTRL, @@ -399,6 +401,9 @@ static void zynq_slcr_write(void *opaque, hwaddr offset, goto bad_reg; } s->reset[(offset - 0x200) / 4] = val; + if (offset == 0x200 && (val & R_PSS_RST_CTRL_SOFT_RST)) { + qemu_system_reset_request(); + } break; case 0x300: s->apu_ctrl = val;