aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/firmware/xilinx/zynqmp.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
index 765a2ca1b100..af5cffd3ac43 100644
--- a/drivers/firmware/xilinx/zynqmp.c
+++ b/drivers/firmware/xilinx/zynqmp.c
@@ -557,6 +557,61 @@ static int zynqmp_pm_set_suspend_mode(u32 mode)
557 return zynqmp_pm_invoke_fn(PM_SET_SUSPEND_MODE, mode, 0, 0, 0, NULL); 557 return zynqmp_pm_invoke_fn(PM_SET_SUSPEND_MODE, mode, 0, 0, 0, NULL);
558} 558}
559 559
560/**
561 * zynqmp_pm_request_node() - Request a node with specific capabilities
562 * @node: Node ID of the slave
563 * @capabilities: Requested capabilities of the slave
564 * @qos: Quality of service (not supported)
565 * @ack: Flag to specify whether acknowledge is requested
566 *
567 * This function is used by master to request particular node from firmware.
568 * Every master must request node before using it.
569 *
570 * Return: Returns status, either success or error+reason
571 */
572static int zynqmp_pm_request_node(const u32 node, const u32 capabilities,
573 const u32 qos,
574 const enum zynqmp_pm_request_ack ack)
575{
576 return zynqmp_pm_invoke_fn(PM_REQUEST_NODE, node, capabilities,
577 qos, ack, NULL);
578}
579
580/**
581 * zynqmp_pm_release_node() - Release a node
582 * @node: Node ID of the slave
583 *
584 * This function is used by master to inform firmware that master
585 * has released node. Once released, master must not use that node
586 * without re-request.
587 *
588 * Return: Returns status, either success or error+reason
589 */
590static int zynqmp_pm_release_node(const u32 node)
591{
592 return zynqmp_pm_invoke_fn(PM_RELEASE_NODE, node, 0, 0, 0, NULL);
593}
594
595/**
596 * zynqmp_pm_set_requirement() - PM call to set requirement for PM slaves
597 * @node: Node ID of the slave
598 * @capabilities: Requested capabilities of the slave
599 * @qos: Quality of service (not supported)
600 * @ack: Flag to specify whether acknowledge is requested
601 *
602 * This API function is to be used for slaves a PU already has requested
603 * to change its capabilities.
604 *
605 * Return: Returns status, either success or error+reason
606 */
607static int zynqmp_pm_set_requirement(const u32 node, const u32 capabilities,
608 const u32 qos,
609 const enum zynqmp_pm_request_ack ack)
610{
611 return zynqmp_pm_invoke_fn(PM_SET_REQUIREMENT, node, capabilities,
612 qos, ack, NULL);
613}
614
560static const struct zynqmp_eemi_ops eemi_ops = { 615static const struct zynqmp_eemi_ops eemi_ops = {
561 .get_api_version = zynqmp_pm_get_api_version, 616 .get_api_version = zynqmp_pm_get_api_version,
562 .get_chipid = zynqmp_pm_get_chipid, 617 .get_chipid = zynqmp_pm_get_chipid,
@@ -575,6 +630,9 @@ static const struct zynqmp_eemi_ops eemi_ops = {
575 .reset_get_status = zynqmp_pm_reset_get_status, 630 .reset_get_status = zynqmp_pm_reset_get_status,
576 .init_finalize = zynqmp_pm_init_finalize, 631 .init_finalize = zynqmp_pm_init_finalize,
577 .set_suspend_mode = zynqmp_pm_set_suspend_mode, 632 .set_suspend_mode = zynqmp_pm_set_suspend_mode,
633 .request_node = zynqmp_pm_request_node,
634 .release_node = zynqmp_pm_release_node,
635 .set_requirement = zynqmp_pm_set_requirement,
578}; 636};
579 637
580/** 638/**