diff options
author | Dario Binacchi <dariobin@libero.it> | 2020-12-30 00:06:31 +0100 |
---|---|---|
committer | Lokesh Vutla <lokeshvutla@ti.com> | 2021-01-12 10:58:04 +0530 |
commit | 2983ad55a13e9afcdf1a3d8f55eea038c0a0e8a3 (patch) | |
tree | d586303823a6aa0aa980451e53610dc20e7e66b5 /arch/sandbox/include | |
parent | 6337d53fdf45df764bc9946d927172397f183d37 (diff) | |
download | u-boot-2983ad55a13e9afcdf1a3d8f55eea038c0a0e8a3.tar.gz |
clk: add clk_round_rate()
It returns the rate which will be set if you ask clk_set_rate() to set
that rate. It provides a way to query exactly what rate you'll get if
you call clk_set_rate() with that same argument.
So essentially, clk_round_rate() and clk_set_rate() are equivalent
except the former does not modify the clock hardware in any way.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r-- | arch/sandbox/include/asm/clk.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/clk.h b/arch/sandbox/include/asm/clk.h index c184c4bffc..0294baee27 100644 --- a/arch/sandbox/include/asm/clk.h +++ b/arch/sandbox/include/asm/clk.h @@ -106,6 +106,15 @@ int sandbox_clk_test_get_bulk(struct udevice *dev); */ ulong sandbox_clk_test_get_rate(struct udevice *dev, int id); /** + * sandbox_clk_test_round_rate - Ask the sandbox clock test device to round a + * clock's rate. + * + * @dev: The sandbox clock test (client) device. + * @id: The test device's clock ID to configure. + * @return: The rounded rate of the clock. + */ +ulong sandbox_clk_test_round_rate(struct udevice *dev, int id, ulong rate); +/** * sandbox_clk_test_set_rate - Ask the sandbox clock test device to set a * clock's rate. * |