blob: 7bcf596267cb52aae4ee380f4f2adc08b8176f4c [file] [log] [blame]
Soren Brinkmann76fcae32016-03-06 20:16:27 -08001/*
Venkatesh Yadav Abbarapu35a8be92019-04-04 14:23:32 +05302 * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved.
Soren Brinkmann76fcae32016-03-06 20:16:27 -08003 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Soren Brinkmann76fcae32016-03-06 20:16:27 -08005 */
6
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00007#ifndef PM_IPI_H
8#define PM_IPI_H
Soren Brinkmann76fcae32016-03-06 20:16:27 -08009
Jolly Shah259afe52019-01-09 12:37:57 -080010#include <plat_ipi.h>
Soren Brinkmann76fcae32016-03-06 20:16:27 -080011#include "pm_common.h"
12
Jolly Shah259afe52019-01-09 12:37:57 -080013#define IPI_BLOCKING 1
14#define IPI_NON_BLOCKING 0
15
Wendy Liang328105c2017-10-03 23:21:11 -070016int pm_ipi_init(const struct pm_proc *proc);
Soren Brinkmann76fcae32016-03-06 20:16:27 -080017
18enum pm_ret_status pm_ipi_send(const struct pm_proc *proc,
19 uint32_t payload[PAYLOAD_ARG_CNT]);
Tejas Patelaf4b10e2018-02-09 02:42:59 -080020enum pm_ret_status pm_ipi_send_non_blocking(const struct pm_proc *proc,
21 uint32_t payload[PAYLOAD_ARG_CNT]);
Soren Brinkmann76fcae32016-03-06 20:16:27 -080022enum pm_ret_status pm_ipi_send_sync(const struct pm_proc *proc,
23 uint32_t payload[PAYLOAD_ARG_CNT],
Soren Brinkmannd6c9e032016-09-22 11:35:47 -070024 unsigned int *value, size_t count);
Soren Brinkmann84f0af42016-09-30 14:24:25 -070025void pm_ipi_buff_read_callb(unsigned int *value, size_t count);
Wendy Liang328105c2017-10-03 23:21:11 -070026void pm_ipi_irq_enable(const struct pm_proc *proc);
27void pm_ipi_irq_clear(const struct pm_proc *proc);
Jolly Shah259afe52019-01-09 12:37:57 -080028uint32_t pm_ipi_irq_status(const struct pm_proc *proc);
Venkatesh Yadav Abbarapu35a8be92019-04-04 14:23:32 +053029#if ZYNQMP_IPI_CRC_CHECK
30uint32_t calculate_crc(uint32_t payload[PAYLOAD_ARG_CNT], uint32_t buffersize);
31#endif
Soren Brinkmann76fcae32016-03-06 20:16:27 -080032
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000033#endif /* PM_IPI_H */