From patchwork Fri Jun 25 11:18:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 466834 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp1354379jao; Fri, 25 Jun 2021 04:19:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcKTQh+qs4iMC9WFlsxhW5JO3kpBmQxtEyqoTIZsBL6sfdoeWCwUwsELcJrMcBvOs1ocPH X-Received: by 2002:a67:ef84:: with SMTP id r4mr7602699vsp.21.1624619955011; Fri, 25 Jun 2021 04:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624619955; cv=none; d=google.com; s=arc-20160816; b=ejdaNNkalVU8Br3CzisxNwSwN/p76ZsSpTs5T75AIFdQpLdZMZRmSXnVJGsDZiBS51 r8fioHdFFJmrhHJamcVrR/1JB2wAZBpqW9eLl9w3npQXOq0NTD3eMtMN45a6jbog5mPT xPq4A1vaYWyAU2BIXdSk8jFcsiongMBeN5yv0keHKJ7vxDsQB9TojNH/NhVwDo5AZ1/5 Wxf1jJYlFfAA9FFLYOyBhV2ZBMt0TkH0PYRxITKd1aA/QqMQlj+ck2jzZnTgf8sVBDVt UEDDUF6UVPajol3FFAD84NuMIS1tD+LhCvzK51xNGaWk2nH6sXKdhYL8bbU1GWDeVVS/ x49Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=72EAHzjgI7n9esbIxOKx7xfZpD41wmTxY05X8fNraEE=; b=MAdetwxpych52MiC6PE3Oy/0chzNebPU2q21toDW68qb3iJtDBjU96IjWnZdVnn/zH Pu9UfQ/TKL4QPqXrJico0OCx6H4ya6Gnau3oap9vTFgXy3fYxL8A7QlF7CWu1fTB8lHn PGsBx1QdsRvxkLJryEoQ61/OfNx60tfijLxjErxcuund/VR4ZDEX9yYmlkf3u5QpsQhs 9ECDnjMdoZ+J+3nCKgbLmdJQ4gfWHRxuc9b+KV82Dfe3mlzqm2omD3eDQbZuzxroCpy8 /+oOUCG99VfYOGp7tHx1BD5qbr60xP1C/I4mPWSZYWyA55Zzi84lhY23NVaxicEVEqwh whzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BS0i51QG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s9si3905721vsc.59.2021.06.25.04.19.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jun 2021 04:19:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BS0i51QG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwjre-0007iT-Da for patch@linaro.org; Fri, 25 Jun 2021 07:19:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwjrR-0007en-9G for qemu-devel@nongnu.org; Fri, 25 Jun 2021 07:19:01 -0400 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]:36483) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwjrN-0004W2-O4 for qemu-devel@nongnu.org; Fri, 25 Jun 2021 07:19:01 -0400 Received: by mail-lj1-x233.google.com with SMTP id a16so12024105ljq.3 for ; Fri, 25 Jun 2021 04:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=72EAHzjgI7n9esbIxOKx7xfZpD41wmTxY05X8fNraEE=; b=BS0i51QGphBB7lAKKvSacnw0beS4Yp1wepo2Ec0vsYwt013aBIs93AOUQY76eP2tlI Z3rysiwTV8Nz0630W5GcwrlaXf0xRwYNumdMgYr+/O5lTVJjCFRVnGY11gfa0x5x9QoL UUyM4kUGcjMLHcYeCyhyNYScoFvqSWy9Amn+zaDDGMUgSN9D5x7VUm4pCqE8Bv/9iS/G DbbH7YycLmxdYyc2RsS1pTOarJtrtz4HAzImGS7bYwL9NCROzGgIdyvyHxQQe9IVoujr j6lL01abans+LpGkfqyrk4Pd5pqiUvnYZeg/TY8aRE6JtWW2vQyPZQSQ86778Qt8goPp +w0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=72EAHzjgI7n9esbIxOKx7xfZpD41wmTxY05X8fNraEE=; b=hvf9xo/3TtzAoj2E1Zi9JB739p1YTf04w+Wp6sD5a7MY+JfeLd0LK2ncrwHPFJwi7d XczRFZJPaggM8BMVSkRZdO7/sEtY+LQMoGH82F1JppfTkoREdQv2TG96phm6Lk+bSQX2 mWwtmSbepHJxab/X3eleN7DJKvSU1SQOiE9AvVNOXPo4n/nvPo8YPMNq7gXK+TMlXqS8 bLcJec92kxl1LjFUQ9XONie9bdYuF01pS7b3R4npy9eSitPQMHA49MuI2gs3sBwh3ktN kDbTcTVMHCKGTA8KZKqAOZ4d16plvC5xwn+a/05xzMeacG4Isk1K6sYUlLhQzUKK6QVC OVEw== X-Gm-Message-State: AOAM530FZ0Zm+BDSDrSKzH2wMbf36uGdq1GSYbakBtWWssNwzXJ3apM+ z2SpG7Apg/u3laFUyD8w+4ULN0oF17iuYA== X-Received: by 2002:a2e:3619:: with SMTP id d25mr7614924lja.439.1624619935974; Fri, 25 Jun 2021 04:18:55 -0700 (PDT) Received: from localhost.localdomain ([91.193.178.173]) by smtp.gmail.com with ESMTPSA id p19sm536354lfd.70.2021.06.25.04.18.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 04:18:55 -0700 (PDT) From: Maxim Uvarov To: qemu-devel@nongnu.org Subject: [PATCH 1/2] arm/virt: fix irq mapping for gpio_pwr Date: Fri, 25 Jun 2021 14:18:41 +0300 Message-Id: <20210625111842.3790-2-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210625111842.3790-1-maxim.uvarov@linaro.org> References: <20210625111842.3790-1-maxim.uvarov@linaro.org> Received-SPF: pass client-ip=2a00:1450:4864:20::233; envelope-from=maxim.uvarov@linaro.org; helo=mail-lj1-x233.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, Maxim Uvarov Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Fix irq mapping for virt machine reboot and shutdown interrupts triggered from ATF code. Signed-off-by: Maxim Uvarov --- hw/arm/virt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 4b96f06014..d83f4ebdd3 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -846,8 +846,8 @@ static void create_gpio_keys(char *fdt, DeviceState *pl061_dev, "gpios", phandle, 3, 0); } -#define SECURE_GPIO_POWEROFF 0 -#define SECURE_GPIO_RESET 1 +#define SECURE_GPIO_POWEROFF 1 +#define SECURE_GPIO_RESET 2 static void create_secure_gpio_pwr(char *fdt, DeviceState *pl061_dev, uint32_t phandle) From patchwork Fri Jun 25 11:18:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 466837 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp1355371jao; Fri, 25 Jun 2021 04:20:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4OpfePaTsJN3L5vTeu3bXNS2/eFxn6IV81j4w6nwOCBv1+V14s+v0dr7yRQCbNjMdcKi2 X-Received: by 2002:ab0:7e89:: with SMTP id j9mr10501887uax.128.1624620035730; Fri, 25 Jun 2021 04:20:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624620035; cv=none; d=google.com; s=arc-20160816; b=bIVPaZI5gdgaEKhr+sH+QKVatSEPebX+1mhb1xc/uI9/X2PNSqgGaI9097N/0JQmRY mag8rl4QCeG/9nSU0Fxygs17WhxBWz++ddGQXUr1r05Jmo4hY5VIGhlWj3gbDVjtSDgB XPax5uA4n692dilH0ScqdmqWz7JmWlgNGQhVgiPJi23dAFFjxLmiUltpxmT4TXByXlzE UykGiYn+Qk2SLTcC4ohZJWvoc+Hp9kyaDJMirzEbaJ2mDTAMlsK1GsUPrvTRNWiJSzEl 4iui+AU47KkA/dGZUdngiRrb8GM+IODGAdqqnmm1KvtyaRw3VVyhlE0WinHZ5Cm5Ch+A 3/bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=U8+L0pfEA+Z4ZeIBlM5nqpsz15izDVESlVEK+IwSfIk=; b=ckqZ1s7sB/bDX6h88goFrZ8HNDLeQM1gobZrE60E35VlE1fuTeVp/MrrG7PEU4314Z 0hP3rjHSx6pnwzpFWmcNZF13KdKf9ddJi61TtTcl6kW+5Utj0zwivWZjBwMn+r79xyoJ 62XWbHg5vthVnChms0TBPdAJgl0WAJMFvLMR0vgm1IQeEfOV/r7akxKSjqZ2IsKxCpn2 q8fyZC8rNrLjARzf/kzyNx8PjdpQaf8IVPgaU4gs4ex/rzAd9NBJkBk8oxBFZip8+2Xa KX8M1rcVwnTqJ2UqOnAeBY+Nse8L8x60oc1Ol2BNKnDzYemcdkszlenA7r2MuB5nsNbz fscw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OnyXBT2U; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y17si2776281vsm.321.2021.06.25.04.20.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jun 2021 04:20:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OnyXBT2U; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwjsv-0000Mm-93 for patch@linaro.org; Fri, 25 Jun 2021 07:20:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwjrR-0007eT-3x for qemu-devel@nongnu.org; Fri, 25 Jun 2021 07:19:01 -0400 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]:41582) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwjrP-0004XD-7d for qemu-devel@nongnu.org; Fri, 25 Jun 2021 07:19:00 -0400 Received: by mail-lj1-x233.google.com with SMTP id z22so12000825ljh.8 for ; Fri, 25 Jun 2021 04:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=U8+L0pfEA+Z4ZeIBlM5nqpsz15izDVESlVEK+IwSfIk=; b=OnyXBT2U0+l9H+w23kt6XivRAnbG60JM0jhY/RvlDiaksGrDcQv+wYaRMqNvGJkoL3 hg7RGQV/VU+KBCQF+ypgEgvl63TkAta9iWNA5rg+cH4LbAF2R0hl2lqpfrW0Os8ZbvAF teYgeG1+5jkhPNLSLQ8QZuV7R6gAYRtBD9fAkxuS47j9c7KOR9fLCzfuIRBKqr8RgFei 3zyLxrTF8ocUugS0R4wpv8TfA5NqmXI/BnSLfEwuY7/hCJVuyDo5dlNP8SxUhsPFmQLn zUgc84OUZc6WBLgoLOlV3Y/d2r2BBDq/tnrIJFLUVly82Pr5nJKep53t5SuH4IFzQ0Dz YK8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=U8+L0pfEA+Z4ZeIBlM5nqpsz15izDVESlVEK+IwSfIk=; b=V3GlAqc2PN89b3m3KzUN9oP02TltGNGVBCvTpTVeH4NQqARb7QFIJ/xpbCFz+5gtuQ B3RDPVnJ/jla5Nt6XXqEUIv1w65te/1KeI0SAkxnGFO5x4mcyzdPx1qmXOiIGW4v3YGe 18NLPqZ6+k5nG/YSPKmb42x/TCRLkGDkeHyWaI1XT9xAokc7IwfXAouJuNOA8EfL2yP1 PITGDcDyksNGaNkA0g25tB3LC6CcaH/uXx9AsSwntSwEJ5kf7VvKzdA3gojNBFw3Lj6n D5QIt22m/wl2Q7Tkp4/7AG6EPvjlJSjeB494lSaj949ZtsG9dSg76tia3XubB/eQtSAf ZU9Q== X-Gm-Message-State: AOAM530fcm24uQey3WkBBGht04D0oL7QZ9iVZNVGPeMiICzgcjM3fmkc az5JBKW2+vjs9A87i19wc0qpUrhklpz7pA== X-Received: by 2002:a2e:22c6:: with SMTP id i189mr8075185lji.97.1624619937523; Fri, 25 Jun 2021 04:18:57 -0700 (PDT) Received: from localhost.localdomain ([91.193.178.173]) by smtp.gmail.com with ESMTPSA id p19sm536354lfd.70.2021.06.25.04.18.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 04:18:56 -0700 (PDT) From: Maxim Uvarov To: qemu-devel@nongnu.org Subject: [PATCH 2/2] gpio_pwr: use shutdown function for reboot Date: Fri, 25 Jun 2021 14:18:42 +0300 Message-Id: <20210625111842.3790-3-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210625111842.3790-1-maxim.uvarov@linaro.org> References: <20210625111842.3790-1-maxim.uvarov@linaro.org> Received-SPF: pass client-ip=2a00:1450:4864:20::233; envelope-from=maxim.uvarov@linaro.org; helo=mail-lj1-x233.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, Maxim Uvarov Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" qemu has 2 type of functions: shutdown and reboot. Shutdown function has to be used for machine shutdown. Signed-off-by: Maxim Uvarov --- hw/gpio/gpio_pwr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 Reviewed-by: Peter Maydell diff --git a/hw/gpio/gpio_pwr.c b/hw/gpio/gpio_pwr.c index 7714fa0dc4..dbaf1c70c8 100644 --- a/hw/gpio/gpio_pwr.c +++ b/hw/gpio/gpio_pwr.c @@ -43,7 +43,7 @@ static void gpio_pwr_reset(void *opaque, int n, int level) static void gpio_pwr_shutdown(void *opaque, int n, int level) { if (level) { - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); + qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); } }