Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 1 | /* |
Venkatesh Yadav Abbarapu | 35a8be9 | 2019-04-04 14:23:32 +0530 | [diff] [blame] | 2 | * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved. |
Rajan Vaja | 566b2f9 | 2022-08-31 12:54:38 +0200 | [diff] [blame] | 3 | * Copyright (c) 2020-2022, Xilinx, Inc. All rights reserved. |
| 4 | * Copyright (c) 2022, 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 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 9 | #ifndef PM_IPI_H |
| 10 | #define PM_IPI_H |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 11 | |
Jolly Shah | 259afe5 | 2019-01-09 12:37:57 -0800 | [diff] [blame] | 12 | #include <plat_ipi.h> |
Rajan Vaja | 566b2f9 | 2022-08-31 12:54:38 +0200 | [diff] [blame] | 13 | #include <stddef.h> |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 14 | #include "pm_common.h" |
| 15 | |
Jolly Shah | 259afe5 | 2019-01-09 12:37:57 -0800 | [diff] [blame] | 16 | #define IPI_BLOCKING 1 |
| 17 | #define IPI_NON_BLOCKING 0 |
| 18 | |
HariBabu Gattem | aa81171 | 2022-10-07 00:07:49 -0700 | [diff] [blame] | 19 | void pm_ipi_init(const struct pm_proc *proc); |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 20 | |
| 21 | enum pm_ret_status pm_ipi_send(const struct pm_proc *proc, |
| 22 | uint32_t payload[PAYLOAD_ARG_CNT]); |
Tejas Patel | af4b10e | 2018-02-09 02:42:59 -0800 | [diff] [blame] | 23 | enum pm_ret_status pm_ipi_send_non_blocking(const struct pm_proc *proc, |
| 24 | uint32_t payload[PAYLOAD_ARG_CNT]); |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 25 | enum pm_ret_status pm_ipi_send_sync(const struct pm_proc *proc, |
| 26 | uint32_t payload[PAYLOAD_ARG_CNT], |
Venkatesh Yadav Abbarapu | e7c4538 | 2022-05-19 14:49:49 +0530 | [diff] [blame] | 27 | uint32_t *value, size_t count); |
| 28 | void pm_ipi_buff_read_callb(uint32_t *value, size_t count); |
Wendy Liang | 328105c | 2017-10-03 23:21:11 -0700 | [diff] [blame] | 29 | void pm_ipi_irq_enable(const struct pm_proc *proc); |
| 30 | void pm_ipi_irq_clear(const struct pm_proc *proc); |
Jolly Shah | 259afe5 | 2019-01-09 12:37:57 -0800 | [diff] [blame] | 31 | uint32_t pm_ipi_irq_status(const struct pm_proc *proc); |
Venkatesh Yadav Abbarapu | bfa2a2a | 2021-02-19 01:40:14 -0700 | [diff] [blame] | 32 | #if IPI_CRC_CHECK |
Venkatesh Yadav Abbarapu | 35a8be9 | 2019-04-04 14:23:32 +0530 | [diff] [blame] | 33 | uint32_t calculate_crc(uint32_t payload[PAYLOAD_ARG_CNT], uint32_t buffersize); |
| 34 | #endif |
Soren Brinkmann | 76fcae3 | 2016-03-06 20:16:27 -0800 | [diff] [blame] | 35 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 36 | #endif /* PM_IPI_H */ |