summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFabrice Gasnier <fabrice.gasnier@st.com>2018-07-24 16:31:28 +0200
committerTom Rini <trini@konsulko.com>2018-08-03 19:53:10 -0400
commit1fe243a1e42fe99da0fa45c8c727f9c3d599c6c9 (patch)
treeeeaf0f029ccf5cc128a91ff889914ad6136b0f2a /test
parent14aa210c1d4fb272ba2583b70f13505d3533015a (diff)
downloadu-boot-1fe243a1e42fe99da0fa45c8c727f9c3d599c6c9.tar.gz
u-boot-1fe243a1e42fe99da0fa45c8c727f9c3d599c6c9.tar.bz2
u-boot-1fe243a1e42fe99da0fa45c8c727f9c3d599c6c9.zip
clk: add clk_valid()
Add clk_valid() to check for optional clocks are valid. Call clk_valid() in test/dm/clk.c and add relevant test routine to sandbox clk tests. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/dm/clk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/dm/clk.c b/test/dm/clk.c
index b06906a3ec..898c034e27 100644
--- a/test/dm/clk.c
+++ b/test/dm/clk.c
@@ -28,6 +28,7 @@ static int dm_test_clk(struct unit_test_state *uts)
ut_assertok(uclass_get_device_by_name(UCLASS_MISC, "clk-test",
&dev_test));
ut_assertok(sandbox_clk_test_get(dev_test));
+ ut_assertok(sandbox_clk_test_valid(dev_test));
ut_asserteq(1234,
sandbox_clk_test_get_rate(dev_test,