/**
* struct sandbox_scmi_reset - Simulated reset controller exposed by SCMI
+ * @id: Identifier of the reset controller used in the SCMI protocol
* @asserted: Reset control state: true if asserted, false if desasserted
*/
struct sandbox_scmi_reset {
* @idx: Identifier for the SCMI agent, its index
* @clk: Simulated clocks
* @clk_count: Simulated clocks array size
- * @clk: Simulated reset domains
- * @clk_count: Simulated reset domains array size
+ * @reset: Simulated reset domains
+ * @reset_count: Simulated reset domains array size
* @voltd: Simulated voltage domains (regulators)
* @voltd_count: Simulated voltage domains array size
*/
* processing. It simulates few of the SCMI services for some of the
* SCMI protocols embedded in U-Boot. Currently:
* - SCMI clock protocol: emulate 2 agents each exposing few clocks
- * - SCMI reset protocol: emulate 1 agents each exposing a reset
+ * - SCMI reset protocol: emulate 1 agent exposing a reset controller
* - SCMI voltage domain protocol: emulate 1 agent exposing 2 regulators
*
* Agent #0 simulates 2 clocks, 1 reset domain and 1 voltage domain.
*
* All clocks and regulators are default disabled and reset controller down.
*
- * This Driver exports sandbox_scmi_service_ct() for the test sequence to
+ * This Driver exports sandbox_scmi_service_ctx() for the test sequence to
* get the state of the simulated services (clock state, rate, ...) and
* check back-end device state reflects the request send through the
* various uclass devices, as clocks and reset controllers.
scmi_devices = sandbox_scmi_devices_ctx(dev);
ut_assertnonnull(scmi_devices);
- if (IS_ENABLED(CONFIG_CLK_SCMI))
- ut_asserteq(3, scmi_devices->clk_count);
- if (IS_ENABLED(CONFIG_RESET_SCMI))
- ut_asserteq(1, scmi_devices->reset_count);
+ ut_asserteq(3, scmi_devices->clk_count);
+ ut_asserteq(1, scmi_devices->reset_count);
ut_asserteq(2, scmi_devices->regul_count);
/* State of the simulated SCMI server exposed */
return ret;
}
-
DM_TEST(dm_test_scmi_sandbox_agent, UT_TESTF_SCAN_FDT);
static int dm_test_scmi_clocks(struct unit_test_state *uts)
int ret_dev;
int ret;
- if (!IS_ENABLED(CONFIG_CLK_SCMI))
- return 0;
-
ret = load_sandbox_scmi_test_devices(uts, &dev);
if (ret)
return ret;
return release_sandbox_scmi_test_devices(uts, dev);
}
-
DM_TEST(dm_test_scmi_clocks, UT_TESTF_SCAN_FDT);
static int dm_test_scmi_resets(struct unit_test_state *uts)
struct udevice *dev = NULL;
int ret;
- if (!IS_ENABLED(CONFIG_RESET_SCMI))
- return 0;
-
ret = load_sandbox_scmi_test_devices(uts, &dev);
if (ret)
return ret;
return release_sandbox_scmi_test_devices(uts, dev);
}
-
DM_TEST(dm_test_scmi_resets, UT_TESTF_SCAN_FDT);
static int dm_test_scmi_voltage_domains(struct unit_test_state *uts)