Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp547738ybh; Wed, 18 Mar 2020 04:54:14 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtpD/hfTSkiK4Es3r2M+z2sVgOsmnjIVktqKtjIU25hWz+DGh2oFwPGLTn4UPGWaQNT45Xw X-Received: by 2002:aca:1b11:: with SMTP id b17mr932112oib.4.1584532453949; Wed, 18 Mar 2020 04:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584532453; cv=none; d=google.com; s=arc-20160816; b=EEfUFyqSCZVM9v2NKl/m6nUhYi2VkUfFxv4fjymTnTXQCUz49eYc5QXxdDuepEVnyA J8iuKYsrN6tNMHskXb1fUtx1+BkdgLRP3Wz5WAUs5zrnVD3Tc0cM/s3FtCA3sk/tsUqN u5AMx0FrDb1gavOd+xyQbXbGxTXXUqfXE9RL4HqAT/zUMEt3K9xdCWfllIPvxAO+RESG cUozn+3pcHXoiTGVvwxgvpfuQxB/qw7g5SO9YK0e9k1leoyr3HMSaLNzjNY6hjh2GP9h xDKbbJQ7lsMT61UZyPhijXC5HT7PiEPb+vN2/lxR2QLLvh+/ZRAZYir3PUBRMbeH4O8i 8x0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qsxjC6960K+5oNZ9iWURIRRVnLOuiAa+ObkH57q0PoU=; b=Gaev5oQ3rWqAyb86zO+iPypFO3/oiy+PKA4cNmfCdBWGtq8d9mw7TlUn0XSByq3Q+S I/2vjSfkainFzRrM9aeZEcYenkM5v5BR0aP5/76gdu3Z+wqeoC34MpOJi56td//pv9A/ hfa7iDpBV2YD3EsBI7h6kXeQE8TMSzjSlXJ+6+Tj7AfPCbQD8faeWVYjXFAHvdGO9yWM YOeI3UANWJRXyEU20bjXn5gpglCn+s1xtyfl1tfxtQItpSbADPeCe75R83CYxUGiRgQQ fyknEI98vLbyS8hWWKuTAZ7PvITuNDWrb7nz6cEmoqCJDnmmscK5tLWDIfK+o3EZRDXm 3PYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Tx+/3CzP"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 38si3225089otu.250.2020.03.18.04.54.01; Wed, 18 Mar 2020 04:54:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Tx+/3CzP"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726809AbgCRLwW (ORCPT + 99 others); Wed, 18 Mar 2020 07:52:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:33038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726586AbgCRLwW (ORCPT ); Wed, 18 Mar 2020 07:52:22 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 97191205ED; Wed, 18 Mar 2020 11:52:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584532342; bh=j4eMMoarX1f4rYZawVdTSJLmd2Yr8lYae78R5pTEHGg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Tx+/3CzPnBDsnwzf8p0lZ7jLmQGWwOz1Ql9yItxh/eRbr/BxG26LeROVZBZ+nGwB0 ZZ/AFlTnjMlrBbxyfvIbMkO0MeCJco8di0kIAsHdPzooI3IYc67PFNkI567Y3n6xY2 wBkLIeOLIbn0DDewBarQDdqltUU0OIxwolHXdjts= Date: Wed, 18 Mar 2020 12:52:19 +0100 From: Greg KH To: Jolly Shah Cc: ard.biesheuvel@linaro.org, mingo@kernel.org, matt@codeblueprint.co.uk, sudeep.holla@arm.com, hkallweit1@gmail.com, keescook@chromium.org, dmitry.torokhov@gmail.com, michal.simek@xilinx.com, rajanv@xilinx.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Rajan Vaja , Jolly Shah Subject: Re: [PATCH v3 22/24] firmware: xilinx: Add system shutdown API interface Message-ID: <20200318115219.GC2472686@kroah.com> References: <1583538452-1992-1-git-send-email-jolly.shah@xilinx.com> <1583538452-1992-23-git-send-email-jolly.shah@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1583538452-1992-23-git-send-email-jolly.shah@xilinx.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 06, 2020 at 03:47:30PM -0800, Jolly Shah wrote: > From: Rajan Vaja > > Add system shutdown API interface which asks firmware to > perform system shutdown/restart. > > Signed-off-by: Rajan Vaja > Signed-off-by: Michal Simek > Signed-off-by: Jolly Shah > Signed-off-by: Jolly Shah > --- > drivers/firmware/xilinx/zynqmp.c | 13 +++++++++++++ > include/linux/firmware/xlnx-zynqmp.h | 4 +++- > 2 files changed, 16 insertions(+), 1 deletion(-) > > diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c > index f671b6b..d3f637b 100644 > --- a/drivers/firmware/xilinx/zynqmp.c > +++ b/drivers/firmware/xilinx/zynqmp.c > @@ -834,6 +834,19 @@ int zynqmp_pm_set_requirement(const u32 node, const u32 capabilities, > EXPORT_SYMBOL_GPL(zynqmp_pm_set_requirement); > > /** > + * zynqmp_pm_system_shutdown - PM call to request a system shutdown or restart > + * @type: Shutdown or restart? 0 for shutdown, 1 for restart > + * @subtype: Specifies which system should be restarted or shut down > + * > + * Return: Returns status, either success or error+reason > + */ > +int zynqmp_pm_system_shutdown(const u32 type, const u32 subtype) > +{ > + return zynqmp_pm_invoke_fn(PM_SYSTEM_SHUTDOWN, type, subtype, > + 0, 0, NULL); > +} > + > +/** > * ggs_show - Show global general storage (ggs) sysfs attribute > * @device: Device structure > * @attr: Device attribute structure > diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h > index 8ccaa39..13b9fdb 100644 > --- a/include/linux/firmware/xlnx-zynqmp.h > +++ b/include/linux/firmware/xlnx-zynqmp.h > @@ -66,7 +66,8 @@ > > enum pm_api_id { > PM_GET_API_VERSION = 1, > - PM_REQUEST_NODE = 13, > + PM_SYSTEM_SHUTDOWN = 12, > + PM_REQUEST_NODE, So you might have changed the value of PM_REQUEST_NODE, is that ok? Why remove the explicit value? thanks, greg k-h