net: fec: Add support for periodic output signal of PPS
Subsystems (3)
[email protected]
maintainerPATCH 1/1 net: fec: Add support for periodic output signal of PPS
From: Wei Fang <[email protected]>
This patch adds the support for configuring periodic output signal of PPS. So the PPS can be output at a specified time and period.
For developers or testers, they can use the command "echo <channel> <start.sec> <start.nsec> <period.sec> <period. nsec> > /sys/class/ptp/ptp0/period" to specify time and period to output PPS signal.
Notice that, the channel can only be set to 0. In addtion, the start time must larger than the current PTP clock time. So users can use the command "phc_ctl /dev/ptp0 -- get" to get the current PTP clock time before.
--- drivers/net/ethernet/freescale/fec.h | 2 + drivers/net/ethernet/freescale/fec_ptp.c | 164 ++++++++++++++++++++++- 2 files changed, 164 insertions(+), 2 deletions(-)
drivers/net/ethernet/freescale/fec.h +2 -0
@@ -658,6 +658,8 @@ struct fec_enet_private {unsigned int reload_period;int pps_enable;unsigned int next_counter; +struct hrtimer perout_timer; +u64 perout_stime;struct imx_sc_ipc *ipc_handle;
drivers/net/ethernet/freescale/fec_ptp.c +162 -2
213 lines not on this page · raw message
Signature · 1 line
2.25.1
Quoted 14 lines · On Thu, Oct 20, 2022 at 12:35:56PM +0800, [email protected] wrote:
From: Wei Fang <[email protected]>
This patch adds the support for configuring periodic output signal of PPS. So the PPS can be output at a specified time and period.
For developers or testers, they can use the command "echo <channel> <start.sec> <start.nsec> <period.sec> <period. nsec> >/sys/class/ptp/ptp0/period" to specify time and period to output PPS signal.
Notice that, the channel can only be set to 0. In addtion, the start time must larger than the current PTP clock time. So users can use the command "phc_ctl/dev/ptp0-- get" to get the current PTP clock time before.
Quoted 1 line
Signed-off-by Wei Fang <[email protected]>
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Quoted 14 lines · On Thu, 20 Oct 2022 12:35:56 +0800 you wrote:
From: Wei Fang <[email protected]>
This patch adds the support for configuring periodic output signal of PPS. So the PPS can be output at a specified time and period.
For developers or testers, they can use the command "echo <channel> <start.sec> <start.nsec> <period.sec> <period. nsec> >/sys/class/ptp/ptp0/period" to specify time and period to output PPS signal.
Notice that, the channel can only be set to 0. In addtion, the start time must larger than the current PTP clock time. So users can use the command "phc_ctl/dev/ptp0-- get" to get the current PTP clock time before.
Quoted 1 line
[...]
Here is the summary with links:
- [net-next] net: fec: Add support for periodic output signal of PPS
https://git.kernel.org/netdev/net-next/c/350749b909bf
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html