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

firmware: xilinx: Remove eemi ops for set_suspend_mode

Use direct function call instead of eemi ops for set_suspend_mode.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Jolly Shah <jolly.shah@xilinx.com>
Link: https://lore.kernel.org/r/1587761887-4279-16-git-send-email-jolly.shah@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Rajan Vaja and committed by
Greg Kroah-Hartman
951d0a97 9474da95

+8 -8
+2 -2
drivers/firmware/xilinx/zynqmp.c
··· 724 724 * 725 725 * Return: Returns status, either success or error+reason 726 726 */ 727 - static int zynqmp_pm_set_suspend_mode(u32 mode) 727 + int zynqmp_pm_set_suspend_mode(u32 mode) 728 728 { 729 729 return zynqmp_pm_invoke_fn(PM_SET_SUSPEND_MODE, mode, 0, 0, 0, NULL); 730 730 } 731 + EXPORT_SYMBOL_GPL(zynqmp_pm_set_suspend_mode); 731 732 732 733 /** 733 734 * zynqmp_pm_request_node() - Request a node with specific capabilities ··· 810 809 } 811 810 812 811 static const struct zynqmp_eemi_ops eemi_ops = { 813 - .set_suspend_mode = zynqmp_pm_set_suspend_mode, 814 812 .request_node = zynqmp_pm_request_node, 815 813 .release_node = zynqmp_pm_release_node, 816 814 .set_requirement = zynqmp_pm_set_requirement,
+1 -5
drivers/soc/xilinx/zynqmp_power.c
··· 30 30 31 31 static struct zynqmp_pm_work_struct *zynqmp_pm_init_suspend_work; 32 32 static struct mbox_chan *rx_chan; 33 - static const struct zynqmp_eemi_ops *eemi_ops; 34 33 35 34 enum pm_suspend_mode { 36 35 PM_SUSPEND_MODE_FIRST = 0, ··· 154 155 { 155 156 int md, ret = -EINVAL; 156 157 157 - if (!eemi_ops->set_suspend_mode) 158 - return ret; 159 - 160 158 for (md = PM_SUSPEND_MODE_FIRST; md < ARRAY_SIZE(suspend_modes); md++) 161 159 if (suspend_modes[md] && 162 160 sysfs_streq(suspend_modes[md], buf)) { ··· 162 166 } 163 167 164 168 if (!ret && md != suspend_mode) { 165 - ret = eemi_ops->set_suspend_mode(md); 169 + ret = zynqmp_pm_set_suspend_mode(md); 166 170 if (likely(!ret)) 167 171 suspend_mode = md; 168 172 }
+5 -1
include/linux/firmware/xlnx-zynqmp.h
··· 296 296 struct zynqmp_eemi_ops { 297 297 int (*fpga_load)(const u64 address, const u32 size, const u32 flags); 298 298 int (*fpga_get_status)(u32 *value); 299 - int (*set_suspend_mode)(u32 mode); 300 299 int (*request_node)(const u32 node, 301 300 const u32 capabilities, 302 301 const u32 qos, ··· 335 336 const enum zynqmp_pm_reset_action assert_flag); 336 337 int zynqmp_pm_reset_get_status(const enum zynqmp_pm_reset reset, u32 *status); 337 338 int zynqmp_pm_init_finalize(void); 339 + int zynqmp_pm_set_suspend_mode(u32 mode); 338 340 #else 339 341 static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void) 340 342 { ··· 425 425 return -ENODEV; 426 426 } 427 427 static inline int zynqmp_pm_init_finalize(void) 428 + { 429 + return -ENODEV; 430 + } 431 + static inline int zynqmp_pm_set_suspend_mode(u32 mode) 428 432 { 429 433 return -ENODEV; 430 434 }