aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe-ptp.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c b/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
index f326178ef376..b03e4f58d02e 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
@@ -179,7 +179,7 @@ static int xgbe_adjtime(struct ptp_clock_info *info, s64 delta)
179 return 0; 179 return 0;
180} 180}
181 181
182static int xgbe_gettime(struct ptp_clock_info *info, struct timespec *ts) 182static int xgbe_gettime(struct ptp_clock_info *info, struct timespec64 *ts)
183{ 183{
184 struct xgbe_prv_data *pdata = container_of(info, 184 struct xgbe_prv_data *pdata = container_of(info,
185 struct xgbe_prv_data, 185 struct xgbe_prv_data,
@@ -193,12 +193,13 @@ static int xgbe_gettime(struct ptp_clock_info *info, struct timespec *ts)
193 193
194 spin_unlock_irqrestore(&pdata->tstamp_lock, flags); 194 spin_unlock_irqrestore(&pdata->tstamp_lock, flags);
195 195
196 *ts = ns_to_timespec(nsec); 196 *ts = ns_to_timespec64(nsec);
197 197
198 return 0; 198 return 0;
199} 199}
200 200
201static int xgbe_settime(struct ptp_clock_info *info, const struct timespec *ts) 201static int xgbe_settime(struct ptp_clock_info *info,
202 const struct timespec64 *ts)
202{ 203{
203 struct xgbe_prv_data *pdata = container_of(info, 204 struct xgbe_prv_data *pdata = container_of(info,
204 struct xgbe_prv_data, 205 struct xgbe_prv_data,
@@ -206,7 +207,7 @@ static int xgbe_settime(struct ptp_clock_info *info, const struct timespec *ts)
206 unsigned long flags; 207 unsigned long flags;
207 u64 nsec; 208 u64 nsec;
208 209
209 nsec = timespec_to_ns(ts); 210 nsec = timespec64_to_ns(ts);
210 211
211 spin_lock_irqsave(&pdata->tstamp_lock, flags); 212 spin_lock_irqsave(&pdata->tstamp_lock, flags);
212 213
@@ -236,8 +237,8 @@ void xgbe_ptp_register(struct xgbe_prv_data *pdata)
236 info->max_adj = pdata->ptpclk_rate; 237 info->max_adj = pdata->ptpclk_rate;
237 info->adjfreq = xgbe_adjfreq; 238 info->adjfreq = xgbe_adjfreq;
238 info->adjtime = xgbe_adjtime; 239 info->adjtime = xgbe_adjtime;
239 info->gettime = xgbe_gettime; 240 info->gettime64 = xgbe_gettime;
240 info->settime = xgbe_settime; 241 info->settime64 = xgbe_settime;
241 info->enable = xgbe_enable; 242 info->enable = xgbe_enable;
242 243
243 clock = ptp_clock_register(info, pdata->dev); 244 clock = ptp_clock_register(info, pdata->dev);