diff options
author | Alex Elder <elder@linaro.org> | 2020-07-03 23:23:34 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-03 23:37:33 +0200 |
commit | 78b348f3f15bc0c84bd3559be59266a54f313f64 (patch) | |
tree | 894700fea052d208edcdf61c280aa4c8a19dda7b /drivers/net/ipa/ipa_clock.c | |
parent | ipv6/ping: set skb->mark on icmpv6 sockets (diff) | |
download | linux-78b348f3f15bc0c84bd3559be59266a54f313f64.tar.xz linux-78b348f3f15bc0c84bd3559be59266a54f313f64.zip |
net: ipa: introduce ipa_clock_rate()
Create a new function that returns the current rate of the IPA core
clock.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa_clock.c')
-rw-r--r-- | drivers/net/ipa/ipa_clock.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ipa/ipa_clock.c b/drivers/net/ipa/ipa_clock.c index c5204fd58ac4..0fbc8b1bdf41 100644 --- a/drivers/net/ipa/ipa_clock.c +++ b/drivers/net/ipa/ipa_clock.c @@ -256,6 +256,12 @@ void ipa_clock_put(struct ipa *ipa) mutex_unlock(&clock->mutex); } +/* Return the current IPA core clock rate */ +u32 ipa_clock_rate(struct ipa *ipa) +{ + return ipa->clock ? (u32)clk_get_rate(ipa->clock->core) : 0; +} + /* Initialize IPA clocking */ struct ipa_clock *ipa_clock_init(struct device *dev) { |