diff options
author | Murali Karicheri <m-karicheri2@ti.com> | 2016-12-06 18:00:43 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-07 11:13:48 -0500 |
commit | 5304121adae9fc59f4b640f82200868112edd0bd (patch) | |
tree | fe86f0e2c1c5f1d1ea185a2a2b8c7f98097f79b3 /kernel | |
parent | 4a88fb9565d418cf1c2bf41be7cfe156717b9c85 (diff) | |
download | linux-5304121adae9fc59f4b640f82200868112edd0bd.tar.gz linux-5304121adae9fc59f4b640f82200868112edd0bd.tar.bz2 linux-5304121adae9fc59f4b640f82200868112edd0bd.zip |
clocksource: export the clocks_calc_mult_shift to use by timestamp code
The CPSW CPTS driver is capable of doing timestamping on tx/rx packets and
requires to know mult and shift factors for timestamp conversion from raw
value to nanoseconds (ptp clock). Now these mult and shift factors are
calculated manually and provided through DT, which makes very hard to
support of a lot number of platforms, especially if CPTS refclk is not the
same for some kind of boards and depends on efuse settings (Keystone 2
platforms). Hence, export clocks_calc_mult_shift() to allow drivers like
CPSW CPTS (and other ptp drivesr) to benefit from automaitc calculation of
mult and shift factors.
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/clocksource.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 7e4fad75acaa..150242ccfcd2 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -89,6 +89,7 @@ clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 maxsec) *mult = tmp; *shift = sft; } +EXPORT_SYMBOL_GPL(clocks_calc_mult_shift); /*[Clocksource internal variables]--------- * curr_clocksource: |