mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-23 23:22:02 +00:00
firmware: scmi: fix inline comments and minor coding style issues
Fix inline comments and empty line in scmi driver and test files. Remove test on IS_ENABLED(CONFIG_*_SCMI) in test/dm/scmi.c since these configuration are expected enabled when CONFIG_FIRMWARE_SCMI is enabled in sandbox configuration. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
This commit is contained in:
parent
0124218b8b
commit
c3bba708da
3 changed files with 7 additions and 17 deletions
|
@ -24,6 +24,7 @@ struct sandbox_scmi_clk {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct sandbox_scmi_reset - Simulated reset controller exposed by SCMI
|
* 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
|
* @asserted: Reset control state: true if asserted, false if desasserted
|
||||||
*/
|
*/
|
||||||
struct sandbox_scmi_reset {
|
struct sandbox_scmi_reset {
|
||||||
|
@ -48,8 +49,8 @@ struct sandbox_scmi_voltd {
|
||||||
* @idx: Identifier for the SCMI agent, its index
|
* @idx: Identifier for the SCMI agent, its index
|
||||||
* @clk: Simulated clocks
|
* @clk: Simulated clocks
|
||||||
* @clk_count: Simulated clocks array size
|
* @clk_count: Simulated clocks array size
|
||||||
* @clk: Simulated reset domains
|
* @reset: Simulated reset domains
|
||||||
* @clk_count: Simulated reset domains array size
|
* @reset_count: Simulated reset domains array size
|
||||||
* @voltd: Simulated voltage domains (regulators)
|
* @voltd: Simulated voltage domains (regulators)
|
||||||
* @voltd_count: Simulated voltage domains array size
|
* @voltd_count: Simulated voltage domains array size
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* processing. It simulates few of the SCMI services for some of the
|
* processing. It simulates few of the SCMI services for some of the
|
||||||
* SCMI protocols embedded in U-Boot. Currently:
|
* SCMI protocols embedded in U-Boot. Currently:
|
||||||
* - SCMI clock protocol: emulate 2 agents each exposing few clocks
|
* - 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
|
* - SCMI voltage domain protocol: emulate 1 agent exposing 2 regulators
|
||||||
*
|
*
|
||||||
* Agent #0 simulates 2 clocks, 1 reset domain and 1 voltage domain.
|
* Agent #0 simulates 2 clocks, 1 reset domain and 1 voltage domain.
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
*
|
*
|
||||||
* All clocks and regulators are default disabled and reset controller down.
|
* 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
|
* get the state of the simulated services (clock state, rate, ...) and
|
||||||
* check back-end device state reflects the request send through the
|
* check back-end device state reflects the request send through the
|
||||||
* various uclass devices, as clocks and reset controllers.
|
* various uclass devices, as clocks and reset controllers.
|
||||||
|
|
|
@ -44,10 +44,8 @@ static int ut_assert_scmi_state_postprobe(struct unit_test_state *uts,
|
||||||
scmi_devices = sandbox_scmi_devices_ctx(dev);
|
scmi_devices = sandbox_scmi_devices_ctx(dev);
|
||||||
|
|
||||||
ut_assertnonnull(scmi_devices);
|
ut_assertnonnull(scmi_devices);
|
||||||
if (IS_ENABLED(CONFIG_CLK_SCMI))
|
ut_asserteq(3, scmi_devices->clk_count);
|
||||||
ut_asserteq(3, scmi_devices->clk_count);
|
ut_asserteq(1, scmi_devices->reset_count);
|
||||||
if (IS_ENABLED(CONFIG_RESET_SCMI))
|
|
||||||
ut_asserteq(1, scmi_devices->reset_count);
|
|
||||||
ut_asserteq(2, scmi_devices->regul_count);
|
ut_asserteq(2, scmi_devices->regul_count);
|
||||||
|
|
||||||
/* State of the simulated SCMI server exposed */
|
/* State of the simulated SCMI server exposed */
|
||||||
|
@ -110,7 +108,6 @@ static int dm_test_scmi_sandbox_agent(struct unit_test_state *uts)
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
DM_TEST(dm_test_scmi_sandbox_agent, UT_TESTF_SCAN_FDT);
|
DM_TEST(dm_test_scmi_sandbox_agent, UT_TESTF_SCAN_FDT);
|
||||||
|
|
||||||
static int dm_test_scmi_clocks(struct unit_test_state *uts)
|
static int dm_test_scmi_clocks(struct unit_test_state *uts)
|
||||||
|
@ -121,9 +118,6 @@ static int dm_test_scmi_clocks(struct unit_test_state *uts)
|
||||||
int ret_dev;
|
int ret_dev;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!IS_ENABLED(CONFIG_CLK_SCMI))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
ret = load_sandbox_scmi_test_devices(uts, &dev);
|
ret = load_sandbox_scmi_test_devices(uts, &dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -172,7 +166,6 @@ static int dm_test_scmi_clocks(struct unit_test_state *uts)
|
||||||
|
|
||||||
return release_sandbox_scmi_test_devices(uts, dev);
|
return release_sandbox_scmi_test_devices(uts, dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
DM_TEST(dm_test_scmi_clocks, UT_TESTF_SCAN_FDT);
|
DM_TEST(dm_test_scmi_clocks, UT_TESTF_SCAN_FDT);
|
||||||
|
|
||||||
static int dm_test_scmi_resets(struct unit_test_state *uts)
|
static int dm_test_scmi_resets(struct unit_test_state *uts)
|
||||||
|
@ -182,9 +175,6 @@ static int dm_test_scmi_resets(struct unit_test_state *uts)
|
||||||
struct udevice *dev = NULL;
|
struct udevice *dev = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!IS_ENABLED(CONFIG_RESET_SCMI))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
ret = load_sandbox_scmi_test_devices(uts, &dev);
|
ret = load_sandbox_scmi_test_devices(uts, &dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -203,7 +193,6 @@ static int dm_test_scmi_resets(struct unit_test_state *uts)
|
||||||
|
|
||||||
return release_sandbox_scmi_test_devices(uts, dev);
|
return release_sandbox_scmi_test_devices(uts, dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
DM_TEST(dm_test_scmi_resets, UT_TESTF_SCAN_FDT);
|
DM_TEST(dm_test_scmi_resets, UT_TESTF_SCAN_FDT);
|
||||||
|
|
||||||
static int dm_test_scmi_voltage_domains(struct unit_test_state *uts)
|
static int dm_test_scmi_voltage_domains(struct unit_test_state *uts)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue