net: stmmac: ptp: update tas basetime after ptp adjust

After adjusting the ptp time, the Qbv base time may be the past time
of the new current time. dwmac5 hardware limited the base time cannot
be set as past time. This patch add a btr_reserve to store the base
time get from qopt, then calculate the base time and reset the Qbv
configuration after ptp time adjust.

Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Xiaoliang Yang 2021-07-05 18:26:55 +08:00 committed by David S. Miller
parent b2aae654a4
commit e9e3720002
3 changed files with 46 additions and 2 deletions

View file

@ -117,6 +117,7 @@ struct stmmac_axi {
struct stmmac_est {
struct mutex lock;
int enable;
u32 btr_reserve[2];
u32 btr_offset[2];
u32 btr[2];
u32 ctr[2];