net: dsa: sja1105: Switch to hardware operations for PTP
Adjusting the hardware clock (PTPCLKVAL, PTPCLKADD, PTPCLKRATE) is a requirement for the auxiliary PTP functionality of the switch (TTEthernet, PPS input, PPS output). Therefore we need to switch to using these registers to keep a synchronized time in hardware, instead of the timecounter/cyclecounter implementation, which is reliant on the free-running PTPTSCLK. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d9496f3ecf
commit
2fb079a28a
@@ -516,9 +516,8 @@ static struct sja1105_regs sja1105et_regs = {
|
||||
.rmii_ext_tx_clk = {0x100018, 0x10001F, 0x100026, 0x10002D, 0x100034},
|
||||
.ptpegr_ts = {0xC0, 0xC2, 0xC4, 0xC6, 0xC8},
|
||||
.ptp_control = 0x17,
|
||||
.ptpclk = 0x18, /* Spans 0x18 to 0x19 */
|
||||
.ptpclkval = 0x18, /* Spans 0x18 to 0x19 */
|
||||
.ptpclkrate = 0x1A,
|
||||
.ptptsclk = 0x1B, /* Spans 0x1B to 0x1C */
|
||||
};
|
||||
|
||||
static struct sja1105_regs sja1105pqrs_regs = {
|
||||
@@ -547,9 +546,8 @@ static struct sja1105_regs sja1105pqrs_regs = {
|
||||
.qlevel = {0x604, 0x614, 0x624, 0x634, 0x644},
|
||||
.ptpegr_ts = {0xC0, 0xC4, 0xC8, 0xCC, 0xD0},
|
||||
.ptp_control = 0x18,
|
||||
.ptpclk = 0x19,
|
||||
.ptpclkval = 0x19,
|
||||
.ptpclkrate = 0x1B,
|
||||
.ptptsclk = 0x1C,
|
||||
};
|
||||
|
||||
struct sja1105_info sja1105e_info = {
|
||||
|
Reference in New Issue
Block a user