summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2021-09-11 20:20:03 +0300
committerLeo Yu-Chi Liang <ycliang@andestech.com>2021-10-07 11:08:23 +0300
commit425c08faa8a2d6af5d9c1d83a97572f6401137bf (patch)
treec00a4d17c8b2458c20126929ee8e7f82f1d4c8e2 /test
parent6e23c9f0c1ebe9b93077b6901733cd01d3848208 (diff)
downloadu-boot-425c08faa8a2d6af5d9c1d83a97572f6401137bf.tar.xz
clk: k210: Try harder to get the best config
In some cases, the best config cannot be used because the VCO would be out-of-spec. In these cases, we may need to try a worse combination of r/od in order to find the best representable config. This also adds a few test cases to catch this and other (possible) unlikely errors. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/dm/k210_pll.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/dm/k210_pll.c b/test/dm/k210_pll.c
index 5574ac96fa..f55379f336 100644
--- a/test/dm/k210_pll.c
+++ b/test/dm/k210_pll.c
@@ -84,6 +84,10 @@ static int dm_test_k210_pll(struct unit_test_state *uts)
compare(400000000, 26000000);
compare(27000000, 26000000);
compare(26000000, 27000000);
+ compare(13300000 * 64, 13300000);
+ compare(21250000, 21250000 * 70);
+ compare(21250000, 1750000000);
+ compare(1750000000, 1750000000);
return 0;
}