From 36510e26ad006f41fd59ba54faa581d39b51c6a7 Mon Sep 17 00:00:00 2001 From: Narayan Reddy Date: Thu, 12 Aug 2021 08:20:51 +0000 Subject: [PATCH] eqos: set ssnic to 6 Set SSIN to 6 for EQOS mac version 5.3 Bug 200760072 Change-Id: I72923d42313880dd362b7b6b197269f3495a18de Signed-off-by: Narayan Reddy Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2575178 Tested-by: mobile promotions Reviewed-by: mobile promotions --- include/osi_core.h | 1 + osi/core/eqos_core.c | 2 ++ osi/core/osi_hal.c | 3 +++ 3 files changed, 6 insertions(+) diff --git a/include/osi_core.h b/include/osi_core.h index 84f8e49..d2d920d 100644 --- a/include/osi_core.h +++ b/include/osi_core.h @@ -272,6 +272,7 @@ typedef my_lint_64 nvel64_t; */ #define OSI_PTP_SSINC_16 16U #define OSI_PTP_SSINC_4 4U +#define OSI_PTP_SSINC_6 6U /** @} */ /** diff --git a/osi/core/eqos_core.c b/osi/core/eqos_core.c index e4f3ea3..3d8cb48 100644 --- a/osi/core/eqos_core.c +++ b/osi/core/eqos_core.c @@ -4304,6 +4304,8 @@ static void eqos_config_ssir(struct osi_core_priv_data *const osi_core, if ((mac_tcr & EQOS_MAC_TCR_TSCFUPDT) == EQOS_MAC_TCR_TSCFUPDT) { if (osi_core->mac_ver <= OSI_EQOS_MAC_4_10) { val = OSI_PTP_SSINC_16; + } else if (osi_core->mac_ver == OSI_EQOS_MAC_5_30) { + val = OSI_PTP_SSINC_6; } else { val = OSI_PTP_SSINC_4; } diff --git a/osi/core/osi_hal.c b/osi/core/osi_hal.c index 351adbd..ce52259 100644 --- a/osi/core/osi_hal.c +++ b/osi/core/osi_hal.c @@ -837,6 +837,9 @@ nve32_t osi_ptp_configuration(struct osi_core_priv_data *const osi_core, ssinc = OSI_PTP_SSINC_16; } else { ssinc = OSI_PTP_SSINC_4; + if (osi_core->mac_ver == OSI_EQOS_MAC_5_30) { + ssinc = OSI_PTP_SSINC_6; + } } temp = ((nveu64_t)1000 << 32);