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