Skip to content

Commit

Permalink
net: fec_ptp: fix issue caused by refactor the fec_devtype
Browse files Browse the repository at this point in the history
Commit da72218 ("net: fec: set GPR bit on suspend by DT configuration.")
refactor the fec_devtype, need adjust ptp driver accordingly.

Fixes: da72218 ("net: fec: set GPR bit on suspend by DT configuration.")
Signed-off-by: Joakim Zhang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Joakim Zhang authored and davem330 committed Jun 16, 2021
1 parent cb3cefe commit d237656
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/freescale/fec_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,13 @@ static u64 fec_ptp_read(const struct cyclecounter *cc)
{
struct fec_enet_private *fep =
container_of(cc, struct fec_enet_private, cc);
const struct platform_device_id *id_entry =
platform_get_device_id(fep->pdev);
u32 tempval;

tempval = readl(fep->hwp + FEC_ATIME_CTRL);
tempval |= FEC_T_CTRL_CAPTURE;
writel(tempval, fep->hwp + FEC_ATIME_CTRL);

if (id_entry->driver_data & FEC_QUIRK_BUG_CAPTURE)
if (fep->quirks & FEC_QUIRK_BUG_CAPTURE)
udelay(1);

return readl(fep->hwp + FEC_ATIME);
Expand Down

0 comments on commit d237656

Please sign in to comment.