public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>,
	<michal.simek@xilinx.com>
Cc: <rajan.vaja@xilinx.com>, <manish.narani@xilinx.com>,
	<zou_wei@huawei.com>, <amit.sunil.dhamne@xilinx.com>,
	<lakshmi.sai.krishna.potthuri@xilinx.com>,
	<wendy.liang@xilinx.com>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	Tejas Patel <tejas.patel@xilinx.com>
Subject: Re: [PATCH 1/6] firmware: xilinx: add register notifier in zynqmp firmware
Date: Mon, 21 Jun 2021 13:45:41 +0200	[thread overview]
Message-ID: <6d230f7e-d039-a99b-87e9-25b42bdf9cdb@xilinx.com> (raw)
In-Reply-To: <1622217566-1856-2-git-send-email-abhyuday.godhasara@xilinx.com>



On 5/28/21 5:59 PM, Abhyuday Godhasara wrote:
> In zynqmp-firmware, register notifier is not supported, add support of
> register notifier in zynqmp-firmware.
> 
> Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
> Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
> ---
>  drivers/firmware/xilinx/zynqmp-debug.c |  2 +-
>  drivers/firmware/xilinx/zynqmp.c       | 23 +++++++++++++++++++++++
>  include/linux/firmware/xlnx-zynqmp.h   | 11 ++++++++++-
>  3 files changed, 34 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/firmware/xilinx/zynqmp-debug.c b/drivers/firmware/xilinx/zynqmp-debug.c
> index 99606b3..7841cb7 100644
> --- a/drivers/firmware/xilinx/zynqmp-debug.c
> +++ b/drivers/firmware/xilinx/zynqmp-debug.c
> @@ -2,7 +2,7 @@
>  /*
>   * Xilinx Zynq MPSoC Firmware layer for debugfs APIs
>   *
> - *  Copyright (C) 2014-2018 Xilinx, Inc.
> + *  Copyright (C) 2014-2021 Xilinx, Inc.

no reason for this change when you don't change this file.

>   *
>   *  Michal Simek <michal.simek@xilinx.com>
>   *  Davorin Mista <davorin.mista@aggios.com>
> diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
> index 15b13832..33f190e 100644
> --- a/drivers/firmware/xilinx/zynqmp.c
> +++ b/drivers/firmware/xilinx/zynqmp.c
> @@ -1037,6 +1037,29 @@ int zynqmp_pm_aes_engine(const u64 address, u32 *out)
>  EXPORT_SYMBOL_GPL(zynqmp_pm_aes_engine);
>  
>  /**
> + * zynqmp_pm_register_notifier() - PM API for register a subsystem
> + *                                to be notified about specific
> + *                                event/error.
> + * @node:	Node ID to which the event is related.
> + * @event:	Event Mask of Error events for which wants to get notified.
> + * @wake:	Wake subsystem upon capturing the event if value 1
> + * @enable:	Enable the registration for value 1, disable for value 0
> + *
> + * This function is used to register/un-register for particular node-event
> + * combination in firmware.
> + *
> + * Return: Returns status, either success or error+reason
> + */
> +
> +int zynqmp_pm_register_notifier(const u32 node, const u32 event,
> +				const u32 wake, const u32 enable)
> +{
> +	return zynqmp_pm_invoke_fn(PM_REGISTER_NOTIFIER, node, event,
> +				   wake, enable, NULL);
> +}
> +EXPORT_SYMBOL_GPL(zynqmp_pm_register_notifier);
> +
> +/**
>   * 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
> diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
> index 9d1a5c1..6557832 100644
> --- a/include/linux/firmware/xlnx-zynqmp.h
> +++ b/include/linux/firmware/xlnx-zynqmp.h
> @@ -2,7 +2,7 @@
>  /*
>   * Xilinx Zynq MPSoC Firmware layer
>   *
> - *  Copyright (C) 2014-2019 Xilinx
> + *  Copyright (C) 2014-2021 Xilinx
>   *
>   *  Michal Simek <michal.simek@xilinx.com>
>   *  Davorin Mista <davorin.mista@aggios.com>
> @@ -62,6 +62,7 @@
>  
>  enum pm_api_id {
>  	PM_GET_API_VERSION = 1,
> +	PM_REGISTER_NOTIFIER = 5,
>  	PM_SYSTEM_SHUTDOWN = 12,
>  	PM_REQUEST_NODE = 13,
>  	PM_RELEASE_NODE = 14,
> @@ -411,6 +412,8 @@ int zynqmp_pm_pinctrl_get_config(const u32 pin, const u32 param,
>  				 u32 *value);
>  int zynqmp_pm_pinctrl_set_config(const u32 pin, const u32 param,
>  				 u32 value);
> +int zynqmp_pm_register_notifier(const u32 node, const u32 event,
> +				const u32 wake, const u32 enable);
>  #else
>  static inline int zynqmp_pm_get_api_version(u32 *version)
>  {
> @@ -622,6 +625,12 @@ static inline int zynqmp_pm_pinctrl_set_config(const u32 pin, const u32 param,
>  {
>  	return -ENODEV;
>  }
> +
> +static inline int zynqmp_pm_register_notifier(const u32 node, const u32 event,
> +					      const u32 wake, const u32 enable)
> +{
> +	return -ENODEV;
> +}
>  #endif
>  
>  #endif /* __FIRMWARE_ZYNQMP_H__ */
> 

M

  parent reply	other threads:[~2021-06-21 11:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1622217566-1856-1-git-send-email-abhyuday.godhasara@xilinx.com>
     [not found] ` <1622217566-1856-3-git-send-email-abhyuday.godhasara@xilinx.com>
2021-06-21 11:11   ` [PATCH 2/6] firmware: xilinx: add macros of node ids for error event Michal Simek
2021-06-25 13:35     ` Abhyuday Godhasara
     [not found] ` <1622217566-1856-2-git-send-email-abhyuday.godhasara@xilinx.com>
2021-06-21 11:45   ` Michal Simek [this message]
2021-06-25 13:37     ` [PATCH 1/6] firmware: xilinx: add register notifier in zynqmp firmware Abhyuday Godhasara
     [not found] ` <1622217566-1856-4-git-send-email-abhyuday.godhasara@xilinx.com>
2021-06-21 11:46   ` [PATCH 3/6] firmware: xilinx: export the feature check of " Michal Simek
     [not found] ` <1622217566-1856-6-git-send-email-abhyuday.godhasara@xilinx.com>
2021-06-21 11:48   ` [PATCH 5/6] firmware: xilinx: instantiate xilinx event manager driver Michal Simek
2021-06-21 11:58     ` Michal Simek
     [not found] ` <1622217566-1856-5-git-send-email-abhyuday.godhasara@xilinx.com>
2021-06-21 11:55   ` [PATCH 4/6] drivers: soc: xilinx: add xilinx event management driver Michal Simek
2021-06-25 13:48     ` Abhyuday Godhasara
     [not found] ` <1622217566-1856-7-git-send-email-abhyuday.godhasara@xilinx.com>
2021-06-21 12:00   ` [PATCH 6/6] driver: soc: xilinx: register for power events in zynqmp power driver Michal Simek

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=6d230f7e-d039-a99b-87e9-25b42bdf9cdb@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=abhyuday.godhasara@xilinx.com \
    --cc=amit.sunil.dhamne@xilinx.com \
    --cc=lakshmi.sai.krishna.potthuri@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manish.narani@xilinx.com \
    --cc=rajan.vaja@xilinx.com \
    --cc=tejas.patel@xilinx.com \
    --cc=wendy.liang@xilinx.com \
    --cc=zou_wei@huawei.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