blob: a811fe19c35fcdd3ef3da24be95b51e1e2668b77 [file] [log] [blame]
Etienne Carriere02fd1262020-09-09 18:44:00 +02001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2020, Linaro Limited
4 */
5
6#ifndef __SANDBOX_SCMI_TEST_H
7#define __SANDBOX_SCMI_TEST_H
8
9struct udevice;
10struct sandbox_scmi_agent;
11struct sandbox_scmi_service;
12
13/**
14 * struct sandbox_scmi_agent - Simulated SCMI service seen by SCMI agent
15 * @idx: Identifier for the SCMI agent, its index
16 */
17struct sandbox_scmi_agent {
18 uint idx;
19};
20
21/**
22 * struct sandbox_scmi_service - Reference to simutaed SCMI agents/services
23 * @agent: Pointer to SCMI sandbox agent pointers array
24 * @agent_count: Number of emulated agents exposed in array @agent.
25 */
26struct sandbox_scmi_service {
27 struct sandbox_scmi_agent **agent;
28 size_t agent_count;
29};
30
31#ifdef CONFIG_SCMI_FIRMWARE
32/**
33 * sandbox_scmi_service_context - Get the simulated SCMI services context
34 * @return: Reference to backend simulated resources state
35 */
36struct sandbox_scmi_service *sandbox_scmi_service_ctx(void);
37#else
38static inline struct sandbox_scmi_service *sandbox_scmi_service_ctx(void)
39{
40 return NULL;
41}
42#endif /* CONFIG_SCMI_FIRMWARE */
43#endif /* __SANDBOX_SCMI_TEST_H */