]> git.karo-electronics.de Git - linux-beck.git/commit
clocksource: export the clocks_calc_mult_shift to use by timestamp code
authorMurali Karicheri <m-karicheri2@ti.com>
Wed, 7 Dec 2016 00:00:43 +0000 (18:00 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Dec 2016 16:13:48 +0000 (11:13 -0500)
commit5304121adae9fc59f4b640f82200868112edd0bd
treefe86f0e2c1c5f1d1ea185a2a2b8c7f98097f79b3
parent4a88fb9565d418cf1c2bf41be7cfe156717b9c85
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>
kernel/time/clocksource.c