Rui Miguel Silva | 909ff4d | 2021-12-03 19:00:54 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved. |
| 3 | * Copyright (c) 2021-2023, Linaro Limited. All rights reserved. |
| 4 | * |
| 5 | * SPDX-License-Identifier: BSD-3-Clause |
| 6 | */ |
| 7 | #ifndef OPENAMP_MESSENGER_H |
| 8 | #define OPENAMP_MESSENGER_H |
| 9 | |
| 10 | #include <stddef.h> |
| 11 | #include <stdint.h> |
| 12 | |
| 13 | struct openamp_messenger; |
| 14 | |
| 15 | struct openamp_platform_ops { |
| 16 | int (*transport_init)(struct openamp_messenger *openamp); |
| 17 | int (*transport_deinit)(struct openamp_messenger *openamp); |
| 18 | int (*transport_notify)(struct openamp_messenger *openamp); |
| 19 | int (*transport_receive)(struct openamp_messenger *openamp); |
| 20 | int (*platform_init)(struct openamp_messenger *openamp); |
| 21 | int (*platform_deinit)(struct openamp_messenger *openamp); |
| 22 | int (*platform_call_begin)(struct openamp_messenger *openamp, |
| 23 | uint8_t **req_buf, size_t req_len); |
| 24 | int (*platform_call_invoke)(struct openamp_messenger *openamp, |
| 25 | uint8_t **resp_buf, size_t *resp_len); |
| 26 | int (*platform_call_end)(struct openamp_messenger *openamp); |
| 27 | void *(*platform_virt_to_phys)(struct openamp_messenger *openamp, |
| 28 | void *va); |
| 29 | void *(*platform_phys_to_virt)(struct openamp_messenger *openamp, |
| 30 | void *pa); |
| 31 | }; |
| 32 | |
| 33 | #endif |