igc: Enable internal i225 PPS
authorEderson de Souza <ederson.desouza@intel.com>
Fri, 19 Feb 2021 01:31:03 +0000 (17:31 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 16 Apr 2021 20:15:45 +0000 (13:15 -0700)
commit64433e5bf40abf893c7edbc60899bdcdd7c70b76
tree7f8f7cd05b12c5c84f9eb902bdde5e4c595b50f9
parent1d3cb90cb0101bb44254d295a421a89f3b73f6e8
igc: Enable internal i225 PPS

The i225 device can produce one interrupt on the full second, much
like i210 - from where this patch is inspired.

This patch sets up the full second interruption on the i225 and when
receiving it, it sends a PPS event to PTP (Precision Time Protocol)
kernel subsystem.

The PTP subsystem exposes the PPS events via ioctl and sysfs, and one
can use the `testptp` tool (tools/testing/selftests/ptp) to check that
the events are being generated.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc.h
drivers/net/ethernet/intel/igc/igc_main.c
drivers/net/ethernet/intel/igc/igc_ptp.c