aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorDario Binacchi <dariobin@libero.it>2020-12-30 00:06:31 +0100
committerLokesh Vutla <lokeshvutla@ti.com>2021-01-12 10:58:04 +0530
commit2983ad55a13e9afcdf1a3d8f55eea038c0a0e8a3 (patch)
treed586303823a6aa0aa980451e53610dc20e7e66b5 /arch/sandbox
parent6337d53fdf45df764bc9946d927172397f183d37 (diff)
downloadu-boot-2983ad55a13e9afcdf1a3d8f55eea038c0a0e8a3.zip
u-boot-2983ad55a13e9afcdf1a3d8f55eea038c0a0e8a3.tar.gz
u-boot-2983ad55a13e9afcdf1a3d8f55eea038c0a0e8a3.tar.bz2
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')
-rw-r--r--arch/sandbox/include/asm/clk.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/clk.h b/arch/sandbox/include/asm/clk.h
index c184c4b..0294bae 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.
*