diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2014-08-27 04:37:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-29 22:54:36 -0400 |
commit | 5566401f2f10556776fd199c11d6a02a5e0b7b95 (patch) | |
tree | b9127a13d0c5df4939c72be2fc618e38e9afaf5c /drivers/net/ethernet/stmicro/stmmac/stmmac.h | |
parent | 2b78d348f1bc3396ca1662c6a6177a7fb1ca62ff (diff) |
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>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac.h')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index ca01035634a7..128a0b723a00 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h | |||
@@ -105,6 +105,8 @@ struct stmmac_priv { | |||
105 | struct ptp_clock *ptp_clock; | 105 | struct ptp_clock *ptp_clock; |
106 | struct ptp_clock_info ptp_clock_ops; | 106 | struct ptp_clock_info ptp_clock_ops; |
107 | unsigned int default_addend; | 107 | unsigned int default_addend; |
108 | struct clk *clk_ptp_ref; | ||
109 | unsigned int clk_ptp_rate; | ||
108 | u32 adv_ts; | 110 | u32 adv_ts; |
109 | int use_riwt; | 111 | int use_riwt; |
110 | int irq_wake; | 112 | int irq_wake; |