1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2020, Linaro Limited
5 * Tests scmi_agent uclass and the SCMI drivers implemented in other
6 * uclass devices probe when a SCMI server exposes resources.
8 * Note in test.dts the protocol@10 node in agent 1. Protocol 0x10 is not
9 * implemented in U-Boot SCMI components but the implementation is exepected
10 * to not complain on unknown protocol IDs, as long as it is not used. Note
11 * in test.dts tests that SCMI drivers probing does not fail for such an
12 * unknown SCMI protocol ID.
17 #include <asm/scmi_test.h>
18 #include <dm/device-internal.h>
23 * Test SCMI states when loading and releasing resources
24 * related to SCMI drivers.
26 static int dm_test_scmi_sandbox_agent(struct unit_test_state *uts)
28 struct sandbox_scmi_service *scmi_ctx = sandbox_scmi_service_ctx();
30 ut_assertnonnull(scmi_ctx);
31 ut_asserteq(2, scmi_ctx->agent_count);
32 ut_assertnull(scmi_ctx->agent[0]);
33 ut_assertnull(scmi_ctx->agent[1]);
38 DM_TEST(dm_test_scmi_sandbox_agent, UT_TESTF_SCAN_FDT);