linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Jolly Shah <jolly.shah@xilinx.com>,
	ard.biesheuvel@linaro.org, mingo@kernel.org,
	gregkh@linuxfoundation.org, matt@codeblueprint.co.uk,
	sudeep.holla@arm.com, hkallweit1@gmail.com,
	keescook@chromium.org, dmitry.torokhov@gmail.com,
	michal.simek@xilinx.com
Cc: Rajan Vaja <rajan.vaja@xilinx.com>,
	rajanv@xilinx.com, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/5] firmware: xilinx: Add system shutdown API interface
Date: Wed, 18 Dec 2019 15:24:26 +0100	[thread overview]
Message-ID: <2270666b-5fd7-950f-9943-39f1ce2f2065@xilinx.com> (raw)
In-Reply-To: <1575502159-11327-4-git-send-email-jolly.shah@xilinx.com>

On 05. 12. 19 0:29, Jolly Shah wrote:
> From: Rajan Vaja <rajan.vaja@xilinx.com>
> 
> Add system shutdown API interface which asks firmware to
> perform system shutdown/restart.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
> Signed-off-by: Jolly Shah <jolly.shah@xilinx.com>
> ---
>  drivers/firmware/xilinx/zynqmp.c     | 14 ++++++++++++++
>  include/linux/firmware/xlnx-zynqmp.h |  4 +++-
>  2 files changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
> index 9836174..8dcf5a4 100644
> --- a/drivers/firmware/xilinx/zynqmp.c
> +++ b/drivers/firmware/xilinx/zynqmp.c
> @@ -690,6 +690,19 @@ static int zynqmp_pm_config_reg_access(u32 register_access_id, u32 address,
>  				   address, mask, value, out);
>  }
>  
> +/**
> + * 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
> + */
> +static int zynqmp_pm_system_shutdown(const u32 type, const u32 subtype)
> +{
> +	return zynqmp_pm_invoke_fn(PM_SYSTEM_SHUTDOWN, type, subtype,
> +				   0, 0, NULL);
> +}
> +
>  static const struct zynqmp_eemi_ops eemi_ops = {
>  	.get_api_version = zynqmp_pm_get_api_version,
>  	.get_chipid = zynqmp_pm_get_chipid,
> @@ -714,6 +727,7 @@ static const struct zynqmp_eemi_ops eemi_ops = {
>  	.fpga_load = zynqmp_pm_fpga_load,
>  	.fpga_get_status = zynqmp_pm_fpga_get_status,
>  	.register_access = zynqmp_pm_config_reg_access,
> +	.system_shutdown = zynqmp_pm_system_shutdown,
>  };
>  
>  /**
> diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
> index bf6e9db..b96ea5d 100644
> --- a/include/linux/firmware/xlnx-zynqmp.h
> +++ b/include/linux/firmware/xlnx-zynqmp.h
> @@ -61,7 +61,8 @@
>  
>  enum pm_api_id {
>  	PM_GET_API_VERSION = 1,
> -	PM_REQUEST_NODE = 13,
> +	PM_SYSTEM_SHUTDOWN = 12,
> +	PM_REQUEST_NODE,
>  	PM_RELEASE_NODE,
>  	PM_SET_REQUIREMENT,
>  	PM_RESET_ASSERT = 17,
> @@ -322,6 +323,7 @@ struct zynqmp_eemi_ops {
>  			       const enum zynqmp_pm_request_ack ack);
>  	int (*register_access)(u32 register_access_id, u32 address,
>  			       u32 mask, u32 value, u32 *out);
> +	int (*system_shutdown)(const u32 type, const u32 subtype);
>  };
>  
>  int zynqmp_pm_invoke_fn(u32 pm_api_id, u32 arg0, u32 arg1,
> 

This looks good to me.
Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-12-18 14:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 23:29 [PATCH 0/5] firmware: xilinx: Add xilinx specific sysfs interface Jolly Shah
2019-12-04 23:29 ` [PATCH 1/5] firmware: xilinx: Adds new eemi call for reg access Jolly Shah
2019-12-18 14:10   ` Michal Simek
2019-12-18 14:16     ` Michal Simek
2019-12-18 14:55   ` Sudeep Holla
2019-12-04 23:29 ` [PATCH 2/5] firmware: xilinx: Add sysfs interface Jolly Shah
2019-12-18 14:21   ` Michal Simek
2019-12-04 23:29 ` [PATCH 3/5] firmware: xilinx: Add system shutdown API interface Jolly Shah
2019-12-18 14:24   ` Michal Simek [this message]
2019-12-04 23:29 ` [PATCH 4/5] firmware: xilinx: Add sysfs to set shutdown scope Jolly Shah
2019-12-18 14:25   ` Michal Simek
2019-12-04 23:29 ` [PATCH 5/5] firmware: xilinx: Add sysfs and IOCTL to set boot health status Jolly Shah
2019-12-18 14:28   ` Michal Simek
2019-12-18 14:45 ` [PATCH 0/5] firmware: xilinx: Add xilinx specific sysfs interface Sudeep Holla
2020-01-02 21:01   ` Jolly Shah
2020-01-03 11:31     ` Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2270666b-5fd7-950f-9943-39f1ce2f2065@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hkallweit1@gmail.com \
    --cc=jolly.shah@xilinx.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@codeblueprint.co.uk \
    --cc=mingo@kernel.org \
    --cc=rajan.vaja@xilinx.com \
    --cc=rajanv@xilinx.com \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).