Skip to content
Snippets Groups Projects
Commit 105db959 authored by Lukasz Majewski's avatar Lukasz Majewski Committed by Stefano Babic
Browse files

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: default avatarLukasz Majewski <lukma@denx.de>
parent ec8f1c02
No related branches found
No related tags found
No related merge requests found
......@@ -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.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment