Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 1 | /* |
Michal Simek | 2a47faa | 2023-04-14 08:43:51 +0200 | [diff] [blame] | 2 | * Copyright (c) 2013-2019, Arm Limited and Contributors. All rights reserved. |
Rajan Vaja | 2ba7187 | 2022-08-31 12:54:34 +0200 | [diff] [blame] | 3 | * Copyright (c) 2020-2022, Xilinx, Inc. All rights reserved. |
Jay Buddhabhatti | a63b354 | 2023-02-28 02:22:02 -0800 | [diff] [blame] | 4 | * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved. |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 5 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 6 | * SPDX-License-Identifier: BSD-3-Clause |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | /* |
| 10 | * Contains APU specific macros and macros to be defined depending on |
| 11 | * the execution environment. |
| 12 | */ |
| 13 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 14 | #ifndef PM_CLIENT_H |
| 15 | #define PM_CLIENT_H |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 16 | |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 17 | #include "pm_common.h" |
Isla Mitchell | e363146 | 2017-07-14 10:46:32 +0100 | [diff] [blame] | 18 | #include "pm_defs.h" |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 19 | |
| 20 | /* Functions to be implemented by each PU */ |
Venkatesh Yadav Abbarapu | e7c4538 | 2022-05-19 14:49:49 +0530 | [diff] [blame] | 21 | void pm_client_suspend(const struct pm_proc *proc, uint32_t state); |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 22 | void pm_client_abort_suspend(void); |
| 23 | void pm_client_wakeup(const struct pm_proc *proc); |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 24 | |
Jay Buddhabhatti | a63b354 | 2023-02-28 02:22:02 -0800 | [diff] [blame] | 25 | #if !defined(PLAT_zynqmp) |
| 26 | enum pm_device_node_idx irq_to_pm_node_idx(uint32_t irq); |
| 27 | #endif |
| 28 | |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 29 | /* Global variables to be set in pm_client.c */ |
| 30 | extern const struct pm_proc *primary_proc; |
| 31 | |
Rajan Vaja | 2ba7187 | 2022-08-31 12:54:34 +0200 | [diff] [blame] | 32 | #if defined(PLAT_zynqmp) |
Tejas Patel | f6b2b3c | 2020-01-10 03:08:40 -0800 | [diff] [blame] | 33 | enum pm_ret_status pm_set_suspend_mode(uint32_t mode); |
| 34 | const struct pm_proc *pm_get_proc_by_node(enum pm_node_id nid); |
Rajan Vaja | 2ba7187 | 2022-08-31 12:54:34 +0200 | [diff] [blame] | 35 | #endif /* PLAT_zynqmp */ |
Tejas Patel | f6b2b3c | 2020-01-10 03:08:40 -0800 | [diff] [blame] | 36 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 37 | #endif /* PM_CLIENT_H */ |