linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)
@ 2021-02-11 23:23 Nobuhiro Iwamatsu
  2021-02-12 12:53 ` Michal Simek
  0 siblings, 1 reply; 3+ messages in thread
From: Nobuhiro Iwamatsu @ 2021-02-11 23:23 UTC (permalink / raw)
  To: michal.simek; +Cc: linux-kernel, linux-arm-kernel, Nobuhiro Iwamatsu

zynqmp_pm_get_eemi_ops() was removed in commit 4db8180ffe7c: "Firmware: xilinx:
Remove eemi ops for fpga related APIs", but not in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE).
Any driver who want to communicate with PMC using EEMI APIs use the functions provided
for each function.
This removed zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE), and also
modify the documentation for this driver.

Fixes: 4db8180ffe7c ("firmware: xilinx: Remove eemi ops for fpga related APIs")
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
 v2: Added the comment pointed out by Michal. 

 Documentation/driver-api/xilinx/eemi.rst | 27 +-----------------------
 include/linux/firmware/xlnx-zynqmp.h     |  5 -----
 2 files changed, 1 insertion(+), 31 deletions(-)

diff --git a/Documentation/driver-api/xilinx/eemi.rst b/Documentation/driver-api/xilinx/eemi.rst
index 9dcbc6f18d75df..53416d25d309a8 100644
--- a/Documentation/driver-api/xilinx/eemi.rst
+++ b/Documentation/driver-api/xilinx/eemi.rst
@@ -19,32 +19,7 @@ device to issue or respond to power management requests.
 EEMI ops is a structure containing all eemi APIs supported by Zynq MPSoC.
 The zynqmp-firmware driver maintain all EEMI APIs in zynqmp_eemi_ops
 structure. Any driver who want to communicate with PMC using EEMI APIs
-can call zynqmp_pm_get_eemi_ops().
-
-Example of EEMI ops::
-
-	/* zynqmp-firmware driver maintain all EEMI APIs */
-	struct zynqmp_eemi_ops {
-		int (*get_api_version)(u32 *version);
-		int (*query_data)(struct zynqmp_pm_query_data qdata, u32 *out);
-	};
-
-	static const struct zynqmp_eemi_ops eemi_ops = {
-		.get_api_version = zynqmp_pm_get_api_version,
-		.query_data = zynqmp_pm_query_data,
-	};
-
-Example of EEMI ops usage::
-
-	static const struct zynqmp_eemi_ops *eemi_ops;
-	u32 ret_payload[PAYLOAD_ARG_CNT];
-	int ret;
-
-	eemi_ops = zynqmp_pm_get_eemi_ops();
-	if (IS_ERR(eemi_ops))
-		return PTR_ERR(eemi_ops);
-
-	ret = eemi_ops->query_data(qdata, ret_payload);
+use the functions provided for each function.
 
 IOCTL
 ------
diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
index 2a0da841c942f6..4ef77deaf7918c 100644
--- a/include/linux/firmware/xlnx-zynqmp.h
+++ b/include/linux/firmware/xlnx-zynqmp.h
@@ -355,11 +355,6 @@ int zynqmp_pm_read_pggs(u32 index, u32 *value);
 int zynqmp_pm_system_shutdown(const u32 type, const u32 subtype);
 int zynqmp_pm_set_boot_health_status(u32 value);
 #else
-static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void)
-{
-	return ERR_PTR(-ENODEV);
-}
-
 static inline int zynqmp_pm_get_api_version(u32 *version)
 {
 	return -ENODEV;
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)
  2021-02-11 23:23 [PATCH v2] firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE) Nobuhiro Iwamatsu
@ 2021-02-12 12:53 ` Michal Simek
  2021-02-15 15:56   ` Nobuhiro Iwamatsu
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Simek @ 2021-02-12 12:53 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu, michal.simek; +Cc: linux-kernel, linux-arm-kernel



On 2/12/21 12:23 AM, Nobuhiro Iwamatsu wrote:
> zynqmp_pm_get_eemi_ops() was removed in commit 4db8180ffe7c: "Firmware: xilinx:
> Remove eemi ops for fpga related APIs", but not in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE).
> Any driver who want to communicate with PMC using EEMI APIs use the functions provided
> for each function.
> This removed zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE), and also
> modify the documentation for this driver.
> 
> Fixes: 4db8180ffe7c ("firmware: xilinx: Remove eemi ops for fpga related APIs")
> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
> ---
>  v2: Added the comment pointed out by Michal. 
> 
>  Documentation/driver-api/xilinx/eemi.rst | 27 +-----------------------
>  include/linux/firmware/xlnx-zynqmp.h     |  5 -----
>  2 files changed, 1 insertion(+), 31 deletions(-)
> 
> diff --git a/Documentation/driver-api/xilinx/eemi.rst b/Documentation/driver-api/xilinx/eemi.rst
> index 9dcbc6f18d75df..53416d25d309a8 100644
> --- a/Documentation/driver-api/xilinx/eemi.rst
> +++ b/Documentation/driver-api/xilinx/eemi.rst
> @@ -19,32 +19,7 @@ device to issue or respond to power management requests.
>  EEMI ops is a structure containing all eemi APIs supported by Zynq MPSoC.
>  The zynqmp-firmware driver maintain all EEMI APIs in zynqmp_eemi_ops
>  structure. Any driver who want to communicate with PMC using EEMI APIs
> -can call zynqmp_pm_get_eemi_ops().
> -
> -Example of EEMI ops::
> -
> -	/* zynqmp-firmware driver maintain all EEMI APIs */
> -	struct zynqmp_eemi_ops {
> -		int (*get_api_version)(u32 *version);
> -		int (*query_data)(struct zynqmp_pm_query_data qdata, u32 *out);
> -	};
> -
> -	static const struct zynqmp_eemi_ops eemi_ops = {
> -		.get_api_version = zynqmp_pm_get_api_version,
> -		.query_data = zynqmp_pm_query_data,
> -	};
> -
> -Example of EEMI ops usage::
> -
> -	static const struct zynqmp_eemi_ops *eemi_ops;
> -	u32 ret_payload[PAYLOAD_ARG_CNT];
> -	int ret;
> -
> -	eemi_ops = zynqmp_pm_get_eemi_ops();
> -	if (IS_ERR(eemi_ops))
> -		return PTR_ERR(eemi_ops);
> -
> -	ret = eemi_ops->query_data(qdata, ret_payload);
> +use the functions provided for each function.
>  
>  IOCTL
>  ------
> diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
> index 2a0da841c942f6..4ef77deaf7918c 100644
> --- a/include/linux/firmware/xlnx-zynqmp.h
> +++ b/include/linux/firmware/xlnx-zynqmp.h
> @@ -355,11 +355,6 @@ int zynqmp_pm_read_pggs(u32 index, u32 *value);
>  int zynqmp_pm_system_shutdown(const u32 type, const u32 subtype);
>  int zynqmp_pm_set_boot_health_status(u32 value);
>  #else
> -static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void)
> -{
> -	return ERR_PTR(-ENODEV);
> -}
> -
>  static inline int zynqmp_pm_get_api_version(u32 *version)
>  {
>  	return -ENODEV;
> 

I can't see any difference compare to v1. Don't you forget to commit
your changes?

Thanks,
Michal

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)
  2021-02-12 12:53 ` Michal Simek
@ 2021-02-15 15:56   ` Nobuhiro Iwamatsu
  0 siblings, 0 replies; 3+ messages in thread
From: Nobuhiro Iwamatsu @ 2021-02-15 15:56 UTC (permalink / raw)
  To: Michal Simek; +Cc: Linux Kernel Mailing List, linux ARM

Hi,

2021年2月12日(金) 21:53 Michal Simek <michal.simek@xilinx.com>:
>
>
>
> On 2/12/21 12:23 AM, Nobuhiro Iwamatsu wrote:
> > zynqmp_pm_get_eemi_ops() was removed in commit 4db8180ffe7c: "Firmware: xilinx:
> > Remove eemi ops for fpga related APIs", but not in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE).
> > Any driver who want to communicate with PMC using EEMI APIs use the functions provided
> > for each function.
> > This removed zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE), and also
> > modify the documentation for this driver.
> >
> > Fixes: 4db8180ffe7c ("firmware: xilinx: Remove eemi ops for fpga related APIs")
> > Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
> > ---
> >  v2: Added the comment pointed out by Michal.
> >
> >  Documentation/driver-api/xilinx/eemi.rst | 27 +-----------------------
> >  include/linux/firmware/xlnx-zynqmp.h     |  5 -----
> >  2 files changed, 1 insertion(+), 31 deletions(-)
> >
> > diff --git a/Documentation/driver-api/xilinx/eemi.rst b/Documentation/driver-api/xilinx/eemi.rst
> > index 9dcbc6f18d75df..53416d25d309a8 100644
> > --- a/Documentation/driver-api/xilinx/eemi.rst
> > +++ b/Documentation/driver-api/xilinx/eemi.rst
> > @@ -19,32 +19,7 @@ device to issue or respond to power management requests.
> >  EEMI ops is a structure containing all eemi APIs supported by Zynq MPSoC.
> >  The zynqmp-firmware driver maintain all EEMI APIs in zynqmp_eemi_ops
> >  structure. Any driver who want to communicate with PMC using EEMI APIs
> > -can call zynqmp_pm_get_eemi_ops().
> > -
> > -Example of EEMI ops::
> > -
> > -     /* zynqmp-firmware driver maintain all EEMI APIs */
> > -     struct zynqmp_eemi_ops {
> > -             int (*get_api_version)(u32 *version);
> > -             int (*query_data)(struct zynqmp_pm_query_data qdata, u32 *out);
> > -     };
> > -
> > -     static const struct zynqmp_eemi_ops eemi_ops = {
> > -             .get_api_version = zynqmp_pm_get_api_version,
> > -             .query_data = zynqmp_pm_query_data,
> > -     };
> > -
> > -Example of EEMI ops usage::
> > -
> > -     static const struct zynqmp_eemi_ops *eemi_ops;
> > -     u32 ret_payload[PAYLOAD_ARG_CNT];
> > -     int ret;
> > -
> > -     eemi_ops = zynqmp_pm_get_eemi_ops();
> > -     if (IS_ERR(eemi_ops))
> > -             return PTR_ERR(eemi_ops);
> > -
> > -     ret = eemi_ops->query_data(qdata, ret_payload);
> > +use the functions provided for each function.
> >
> >  IOCTL
> >  ------
> > diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
> > index 2a0da841c942f6..4ef77deaf7918c 100644
> > --- a/include/linux/firmware/xlnx-zynqmp.h
> > +++ b/include/linux/firmware/xlnx-zynqmp.h
> > @@ -355,11 +355,6 @@ int zynqmp_pm_read_pggs(u32 index, u32 *value);
> >  int zynqmp_pm_system_shutdown(const u32 type, const u32 subtype);
> >  int zynqmp_pm_set_boot_health_status(u32 value);
> >  #else
> > -static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void)
> > -{
> > -     return ERR_PTR(-ENODEV);
> > -}
> > -
> >  static inline int zynqmp_pm_get_api_version(u32 *version)
> >  {
> >       return -ENODEV;
> >
>
> I can't see any difference compare to v1. Don't you forget to commit
> your changes?

Oh, sorry. I will resend with update.

Best regards,
  Nobuhiro


-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-15 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11 23:23 [PATCH v2] firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE) Nobuhiro Iwamatsu
2021-02-12 12:53 ` Michal Simek
2021-02-15 15:56   ` Nobuhiro Iwamatsu

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).