Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)

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>
Link: https://lore.kernel.org/r/20210215155849.2425846-1-iwamatsu@nigauri.org
Signed-off-by: Michal Simek <michal.simek@xilinx.com>

authored by

Nobuhiro Iwamatsu and committed by
Michal Simek
79bfe480 f1f21bec

+2 -34
+2 -29
Documentation/driver-api/xilinx/eemi.rst
··· 16 16 device to communicate with a power management controller (PMC) on a 17 17 device to issue or respond to power management requests. 18 18 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. 48 21 49 22 IOCTL 50 23 ------
-5
include/linux/firmware/xlnx-zynqmp.h
··· 354 354 int zynqmp_pm_system_shutdown(const u32 type, const u32 subtype); 355 355 int zynqmp_pm_set_boot_health_status(u32 value); 356 356 #else 357 - static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void) 358 - { 359 - return ERR_PTR(-ENODEV); 360 - } 361 - 362 357 static inline int zynqmp_pm_get_api_version(u32 *version) 363 358 { 364 359 return -ENODEV;