blob: 3452452830b5ada2df42d167e00f1269a135de28 [file] [log] [blame]
Antonio Nino Diaz652d20a2018-12-10 17:17:33 +00001/*
2 * Copyright (c) 2018, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef SPCI_HELPERS_H
8#define SPCI_HELPERS_H
9
10#include <utils_def.h>
11
12/* This error code must be different to the ones used by SPCI */
13#define SPCI_TFTF_ERROR -42
14
15/* Client ID used for SPCI calls */
16#define TFTF_SPCI_CLIENT_ID U(0x00007F7F)
17
18#ifndef __ASSEMBLY__
19
20#include <stdint.h>
21#include <types.h>
22
23int spci_service_handle_open(uint16_t client_id, uint16_t *handle,
24 uint32_t uuid1, uint32_t uuid2,
25 uint32_t uuid3, uint32_t uuid4);
26int spci_service_handle_close(uint16_t client_id, uint16_t handle);
27
Antonio Nino Diazad8fcee2018-12-18 10:51:36 +000028int spci_service_request_start(u_register_t x1, u_register_t x2,
29 u_register_t x3, u_register_t x4,
30 u_register_t x5, u_register_t x6,
31 uint16_t client_id, uint16_t handle,
32 uint32_t *token);
33int spci_service_request_resume(uint16_t client_id, uint16_t handle,
34 uint32_t token, u_register_t *x1,
35 u_register_t *x2, u_register_t *x3);
36int spci_service_get_response(uint16_t client_id, uint16_t handle,
37 uint32_t token, u_register_t *x1,
38 u_register_t *x2, u_register_t *x3);
39
40int spci_service_request_blocking(u_register_t x1, u_register_t x2,
41 u_register_t x3, u_register_t x4,
42 u_register_t x5, u_register_t x6,
43 uint16_t client_id, uint16_t handle,
44 u_register_t *rx1, u_register_t *rx2,
45 u_register_t *rx3);
46
Antonio Nino Diaz652d20a2018-12-10 17:17:33 +000047#endif /* __ASSEMBLY__ */
48
49#endif /* SPCI_HELPERS_H */