mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)
[ Upstream commit79bfe480a0
] zynqmp_pm_get_eemi_ops() was removed in commit4db8180ffe
: "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:4db8180ffe
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
cfc0577ab1
commit
305a936af4
2 changed files with 2 additions and 34 deletions
|
@ -16,35 +16,8 @@ components running across different processing clusters on a chip or
|
||||||
device to communicate with a power management controller (PMC) on a
|
device to communicate with a power management controller (PMC) on a
|
||||||
device to issue or respond to power management requests.
|
device to issue or respond to power management requests.
|
||||||
|
|
||||||
EEMI ops is a structure containing all eemi APIs supported by Zynq MPSoC.
|
Any driver who wants to communicate with PMC using EEMI APIs use the
|
||||||
The zynqmp-firmware driver maintain all EEMI APIs in zynqmp_eemi_ops
|
functions provided for each function.
|
||||||
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);
|
|
||||||
|
|
||||||
IOCTL
|
IOCTL
|
||||||
------
|
------
|
||||||
|
|
|
@ -354,11 +354,6 @@ int zynqmp_pm_read_pggs(u32 index, u32 *value);
|
||||||
int zynqmp_pm_system_shutdown(const u32 type, const u32 subtype);
|
int zynqmp_pm_system_shutdown(const u32 type, const u32 subtype);
|
||||||
int zynqmp_pm_set_boot_health_status(u32 value);
|
int zynqmp_pm_set_boot_health_status(u32 value);
|
||||||
#else
|
#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)
|
static inline int zynqmp_pm_get_api_version(u32 *version)
|
||||||
{
|
{
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
Loading…
Reference in a new issue