MCPcopy Create free account
hub / github.com/F-Stack/f-stack / axgbe_set_tstamp_time

Function axgbe_set_tstamp_time

dpdk/drivers/net/axgbe/axgbe_ethdev.c:1645–1663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1643}
1644
1645static void
1646axgbe_set_tstamp_time(struct axgbe_port *pdata, unsigned int sec,
1647 unsigned int nsec)
1648{
1649 unsigned int count = 100;
1650
1651 /*System Time Sec Update*/
1652 AXGMAC_IOWRITE(pdata, MAC_STSUR, sec);
1653 /*System Time nanoSec Update*/
1654 AXGMAC_IOWRITE(pdata, MAC_STNUR, nsec);
1655 /*Initialize Timestamp*/
1656 AXGMAC_IOWRITE_BITS(pdata, MAC_TSCR, TSINIT, 1);
1657
1658 /* Wait for time update to complete */
1659 while (--count && AXGMAC_IOREAD_BITS(pdata, MAC_TSCR, TSINIT))
1660 rte_delay_ms(1);
1661 if (!count)
1662 PMD_DRV_LOG(ERR, "Timed out initializing timestamp\n");
1663}
1664
1665static int
1666axgbe_timesync_enable(struct rte_eth_dev *dev)

Callers 1

axgbe_timesync_enableFunction · 0.85

Calls 1

rte_delay_msFunction · 0.85

Tested by

no test coverage detected