bnxt_en: Add a non-real time mode to access NIC clock
authorPavan Chebbi <pavan.chebbi@broadcom.com>
Mon, 7 Nov 2022 00:16:32 +0000 (19:16 -0500)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 8 Nov 2022 11:39:02 +0000 (12:39 +0100)
commit85036aee1938d65da4be6ae1bc7e5e7e30b567b9
treeb9c9c03e984d52ed7a24496a39396fe45c5a015f
parent98a4322b70e817f0663adb61b8272f7b995ed41a
bnxt_en: Add a non-real time mode to access NIC clock

When using a PHC that is shared between multiple hosts,
in order to achieve consistent timestamps across all hosts,
we need to isolate the PHC from any host making frequency
adjustments.

This patch adds a non-real time mode for this purpose.
The implementation is based on a free running NIC hardware timer
which is used as the timestamper time-base. Each host implements
individual adjustments to a local timecounter based on the NIC free
running timer.

Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h