Skip to content

Commit 07fb1a4

Browse files
rajanv-xilinxgregkh
authored andcommitted
firmware: xilinx: Remove eemi ops for release_node
Use direct function call instead of using eemi ops for release_node. 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-18-git-send-email-jolly.shah@xilinx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent bf8b27e commit 07fb1a4

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎drivers/firmware/xilinx/zynqmp.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,10 +760,11 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_request_node);
760760
*
761761
* Return: Returns status, either success or error+reason
762762
*/
763-
static int zynqmp_pm_release_node(const u32 node)
763+
int zynqmp_pm_release_node(const u32 node)
764764
{
765765
return zynqmp_pm_invoke_fn(PM_RELEASE_NODE, node, 0, 0, 0, NULL);
766766
}
767+
EXPORT_SYMBOL_GPL(zynqmp_pm_release_node);
767768

768769
/**
769770
* zynqmp_pm_set_requirement() - PM call to set requirement for PM slaves
@@ -810,7 +811,6 @@ static int zynqmp_pm_aes_engine(const u64 address, u32 *out)
810811
}
811812

812813
static const struct zynqmp_eemi_ops eemi_ops = {
813-
.release_node = zynqmp_pm_release_node,
814814
.set_requirement = zynqmp_pm_set_requirement,
815815
.fpga_load = zynqmp_pm_fpga_load,
816816
.fpga_get_status = zynqmp_pm_fpga_get_status,

‎drivers/soc/xilinx/zynqmp_pm_domains.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,13 @@ static void zynqmp_gpd_detach_dev(struct generic_pm_domain *domain,
196196
int ret;
197197
struct zynqmp_pm_domain *pd;
198198

199-
if (!eemi_ops->release_node)
200-
return;
201-
202199
pd = container_of(domain, struct zynqmp_pm_domain, gpd);
203200

204201
/* If this is not the last device to detach there is nothing to do */
205202
if (domain->device_count)
206203
return;
207204

208-
ret = eemi_ops->release_node(pd->node_id);
205+
ret = zynqmp_pm_release_node(pd->node_id);
209206
/* If releasing a node fails print the error and return */
210207
if (ret) {
211208
pr_err("%s() %s release failed for node %d: %d\n",

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ struct zynqmp_pm_query_data {
296296
struct zynqmp_eemi_ops {
297297
int (*fpga_load)(const u64 address, const u32 size, const u32 flags);
298298
int (*fpga_get_status)(u32 *value);
299-
int (*release_node)(const u32 node);
300299
int (*set_requirement)(const u32 node,
301300
const u32 capabilities,
302301
const u32 qos,
@@ -334,6 +333,7 @@ int zynqmp_pm_init_finalize(void);
334333
int zynqmp_pm_set_suspend_mode(u32 mode);
335334
int zynqmp_pm_request_node(const u32 node, const u32 capabilities,
336335
const u32 qos, const enum zynqmp_pm_request_ack ack);
336+
int zynqmp_pm_release_node(const u32 node);
337337
#else
338338
static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void)
339339
{
@@ -436,6 +436,10 @@ static inline int zynqmp_pm_request_node(const u32 node, const u32 capabilities,
436436
{
437437
return -ENODEV;
438438
}
439+
static inline int zynqmp_pm_release_node(const u32 node)
440+
{
441+
return -ENODEV;
442+
}
439443
#endif
440444

441445
#endif /* __FIRMWARE_ZYNQMP_H__ */

0 commit comments

Comments
 (0)