Skip to content

Commit 79bfe48

Browse files
iwamatsuMichal Simek
authored andcommitted
firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)
zynqmp_pm_get_eemi_ops() was removed in commit 4db8180: "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: 4db8180 ("firmware: xilinx: Remove eemi ops for fpga related APIs") Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Link: https://lore.kernel.org/r/20210215155849.2425846-1-iwamatsu@nigauri.org Signed-off-by: Michal Simek <michal.simek@xilinx.com>
1 parent f1f21be commit 79bfe48

2 files changed

Lines changed: 2 additions & 34 deletions

File tree

‎Documentation/driver-api/xilinx/eemi.rst‎

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,8 @@ components running across different processing clusters on a chip or
1616
device to communicate with a power management controller (PMC) on a
1717
device to issue or respond to power management requests.
1818

19-
EEMI ops is a structure containing all eemi APIs supported by Zynq MPSoC.
20-
The zynqmp-firmware driver maintain all EEMI APIs in zynqmp_eemi_ops
21-
structure. Any driver who want to communicate with PMC using EEMI APIs
22-
can call zynqmp_pm_get_eemi_ops().
23-
24-
Example of EEMI ops::
25-
26-
/* zynqmp-firmware driver maintain all EEMI APIs */
27-
struct zynqmp_eemi_ops {
28-
int (*get_api_version)(u32 *version);
29-
int (*query_data)(struct zynqmp_pm_query_data qdata, u32 *out);
30-
};
31-
32-
static const struct zynqmp_eemi_ops eemi_ops = {
33-
.get_api_version = zynqmp_pm_get_api_version,
34-
.query_data = zynqmp_pm_query_data,
35-
};
36-
37-
Example of EEMI ops usage::
38-
39-
static const struct zynqmp_eemi_ops *eemi_ops;
40-
u32 ret_payload[PAYLOAD_ARG_CNT];
41-
int ret;
42-
43-
eemi_ops = zynqmp_pm_get_eemi_ops();
44-
if (IS_ERR(eemi_ops))
45-
return PTR_ERR(eemi_ops);
46-
47-
ret = eemi_ops->query_data(qdata, ret_payload);
19+
Any driver who wants to communicate with PMC using EEMI APIs use the
20+
functions provided for each function.
4821

4922
IOCTL
5023
------

‎include/linux/firmware/xlnx-zynqmp.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,6 @@ int zynqmp_pm_read_pggs(u32 index, u32 *value);
354354
int zynqmp_pm_system_shutdown(const u32 type, const u32 subtype);
355355
int zynqmp_pm_set_boot_health_status(u32 value);
356356
#else
357-
static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void)
358-
{
359-
return ERR_PTR(-ENODEV);
360-
}
361-
362357
static inline int zynqmp_pm_get_api_version(u32 *version)
363358
{
364359
return -ENODEV;

0 commit comments

Comments
 (0)