diff options
author | Lukasz Majewski <lukma@denx.de> | 2019-06-24 15:50:38 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2019-07-19 14:50:30 +0200 |
commit | 105db9593eb53ab85a48bcc2187ff8770b7958ec (patch) | |
tree | 1cb7fbe26eac81fab7f3d4a35278f5480fb777c7 /include | |
parent | ec8f1c02dd0c2e8b7302072b3956a9c56139a139 (diff) | |
download | u-boot-105db9593eb53ab85a48bcc2187ff8770b7958ec.zip u-boot-105db9593eb53ab85a48bcc2187ff8770b7958ec.tar.gz u-boot-105db9593eb53ab85a48bcc2187ff8770b7958ec.tar.bz2 |
clk: Extend struct clk to provide information regarding clock rate
This commit extends the struct clk to provide information regarding the
clock rate.
As a result the clock tree traversal is performed at most once, and further
reads are using the cached value.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/clk.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clk.h b/include/clk.h index a909b71..d7b937c 100644 --- a/include/clk.h +++ b/include/clk.h @@ -40,6 +40,7 @@ struct udevice; * other clock APIs to identify which clock signal to operate upon. * * @dev: The device which implements the clock signal. + * @rate: The clock rate (in HZ). * @id: The clock signal ID within the provider. * @data: An optional data field for scenarios where a single integer ID is not * sufficient. If used, it can be populated through an .of_xlate op and @@ -55,6 +56,7 @@ struct udevice; */ struct clk { struct udevice *dev; + long long rate; /* in HZ */ /* * Written by of_xlate. In the future, we might add more fields here. */ |