• Jacob Keller's avatar
    ice: Support cross-timestamping for E823 devices · 88c360e4
    Jacob Keller authored
    The E822 hardware has cross timestamping support using a device feature
    termed "Hammock Harbor" by the data sheet. This device feature is similar
    to PCIe PTM, and captures the Always Running Timer (ART) simultaneously
    with the PTP hardware clock time.
    
    This functionality also exists on E823 devices, but is not currently
    enabled.
    
    Rename the cross-timestamp functions to use the _e82x postfix, indicating
    that the support works across the E82x family of devices and not just the
    E822 hardware.
    
    The flow for capturing a cross-timestamp requires an additional step on
    E823 devices. The GLTSYN_CMD register must be programmed with the READ_TIME
    command. Otherwise, the cross timestamp will always report a value of zero
    for the PTP hardware clock time.
    
    To fix this, call ice_ptp_src_cmd() prior to initiating the cross timestamp
    logic. Once the cross timestamp has completed, call ice_ptp_src_cmd() with
    ICE_PTP_OP to ensure that the timer command registers are cleared.
    Co-developed-by: default avatarSergey Temerkhanov <sergey.temerkhanov@intel.com>
    Signed-off-by: default avatarSergey Temerkhanov <sergey.temerkhanov@intel.com>
    Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
    Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    88c360e4
ice_ptp.c 75.8 KB