diff options
| author | Tom Rini <[email protected]> | 2021-10-07 09:00:45 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2021-10-07 09:00:45 -0400 |
| commit | 11a69a9ef3f5eaccdca4dd89c7d8d91bd5b3b904 (patch) | |
| tree | 75ea296bb71b6f5ab86b82979304576f04caaa66 /test | |
| parent | ea67f467a43e4c8852bd1ce1bb75f5dc6c3788d1 (diff) | |
| parent | 1b2b52f29402b5aaccccadfe4ba11bd3f29bd414 (diff) | |
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
- Reset improvements, enable coherence manager on ae350, k210 clk
improvements, other fixes
Diffstat (limited to 'test')
| -rw-r--r-- | test/dm/k210_pll.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/test/dm/k210_pll.c b/test/dm/k210_pll.c index 54764f269c5..f55379f3365 100644 --- a/test/dm/k210_pll.c +++ b/test/dm/k210_pll.c @@ -69,27 +69,25 @@ static int dm_test_k210_pll(struct unit_test_state *uts) &theirs)); ut_asserteq(-EINVAL, k210_pll_calc_config(1500000000, 20000000, &theirs)); + ut_asserteq(-EINVAL, k210_pll_calc_config(1750000000, 13300000, + &theirs)); /* Verify we get the same output with brute-force */ - ut_assertok(dm_test_k210_pll_calc_config(390000000, 26000000, &ours)); - ut_assertok(k210_pll_calc_config(390000000, 26000000, &theirs)); - ut_assertok(dm_test_k210_pll_compare(&ours, &theirs)); - - ut_assertok(dm_test_k210_pll_calc_config(26000000, 390000000, &ours)); - ut_assertok(k210_pll_calc_config(26000000, 390000000, &theirs)); - ut_assertok(dm_test_k210_pll_compare(&ours, &theirs)); - - ut_assertok(dm_test_k210_pll_calc_config(400000000, 26000000, &ours)); - ut_assertok(k210_pll_calc_config(400000000, 26000000, &theirs)); - ut_assertok(dm_test_k210_pll_compare(&ours, &theirs)); - - ut_assertok(dm_test_k210_pll_calc_config(27000000, 26000000, &ours)); - ut_assertok(k210_pll_calc_config(27000000, 26000000, &theirs)); - ut_assertok(dm_test_k210_pll_compare(&ours, &theirs)); - - ut_assertok(dm_test_k210_pll_calc_config(26000000, 27000000, &ours)); - ut_assertok(k210_pll_calc_config(26000000, 27000000, &theirs)); - ut_assertok(dm_test_k210_pll_compare(&ours, &theirs)); +#define compare(rate, rate_in) do { \ + ut_assertok(dm_test_k210_pll_calc_config(rate, rate_in, &ours)); \ + ut_assertok(k210_pll_calc_config(rate, rate_in, &theirs)); \ + ut_assertok(dm_test_k210_pll_compare(&ours, &theirs)); \ +} while (0) + + compare(390000000, 26000000); + compare(26000000, 390000000); + 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; } |
