]> git.baikalelectronics.ru Git - kernel.git/commit
stmmac: ptp: fix the reference clock
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>
Wed, 27 Aug 2014 08:37:49 +0000 (10:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Aug 2014 02:54:36 +0000 (19:54 -0700)
commit76e23e3900d052254ba716e760e8253925ecf469
treeb9127a13d0c5df4939c72be2fc618e38e9afaf5c
parentf9f08ad7f3d14f481e12173722615edd95ecae80
stmmac: ptp: fix the reference clock

The PTP reference clock, used for setting the addend in the Timestamp Addend
Register, was erroneously hard-coded (as reported in the databook just as
example).

The patch removes the macro named: STMMAC_SYSCLOCK and allows to use a
reference clock (clk_ptp_ref_i) that can be passed from the platform.

If not passed, the main driver clock will be used as default; note that
this can be fine on some platforms.

Note that, prior this patch, using the old STMMAC_SYSCLOCK on some platforms,
as side effect, the ptp clock can move faster/slower than the system clock.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/devicetree/bindings/net/stmmac.txt
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h