mirror of
git://nv-tegra.nvidia.com/kernel/nvethernetrm.git
synced 2025-12-24 10:34:24 +03:00
core: move API form common/ to core/
Issue: As per unit design following APIs are part of NvEthernetRm but in current implementation is it getting compile with NvEthernetCl also - osi_get_mac_version() - osi_get_hw_features() Fix: move APIs to NvEthernetRm Bug 200669603 Change-Id: I27f5f304a586f40693d700e9bdb40b553d591544 Signed-off-by: rakesh goyal <rgoyal@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2435473 (cherry picked from commit 2d74a69dd1fd0c2567a506ae0f8e797924650e28) Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2448708 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Bhadram Varka
parent
0bfc4d5267
commit
a0bf63c9e9
@@ -782,7 +782,7 @@ static inline unsigned long osi_update_stats_counter(unsigned long last_value,
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief osi_get_mac_version - Reading MAC version
|
||||
* @brief common_get_mac_version - Reading MAC version
|
||||
*
|
||||
* @note
|
||||
* Algorithm:
|
||||
@@ -793,55 +793,20 @@ static inline unsigned long osi_update_stats_counter(unsigned long last_value,
|
||||
*
|
||||
* @pre MAC has to be out of reset.
|
||||
*
|
||||
* @note
|
||||
* Traceability Details:
|
||||
* - SWUD_ID: ETHERNET_NVETHERNETRM_015
|
||||
*
|
||||
* @note
|
||||
* Classification:
|
||||
* - Interrupt: No
|
||||
* - Signal handler: No
|
||||
* - Thread safe: No
|
||||
* - Required Privileges: None
|
||||
*
|
||||
* @note
|
||||
* API Group:
|
||||
* - Initialization: No
|
||||
* - Run time: Yes
|
||||
* - De-initialization: No
|
||||
*
|
||||
* @retval 0 on success
|
||||
* @retval -1 on failure.
|
||||
*/
|
||||
int osi_get_mac_version(void *addr, unsigned int *mac_ver);
|
||||
int common_get_mac_version(void *addr, unsigned int *mac_ver);
|
||||
|
||||
/**
|
||||
* @brief osi_get_hw_features - Reading MAC HW features
|
||||
* @brief comon_get_hw_features - Reading MAC HW features
|
||||
*
|
||||
* @param[in] base: io-remap MAC base address.
|
||||
* @param[in] hw_feat: holds the supported features of the hardware.
|
||||
*
|
||||
* @pre MAC has to be out of reset.
|
||||
*
|
||||
* @note
|
||||
* Traceability Details:
|
||||
* - SWUD_ID: ETHERNET_NVETHERNETRM_016
|
||||
*
|
||||
* @note
|
||||
* Classification:
|
||||
* - Interrupt: No
|
||||
* - Signal handler: No
|
||||
* - Thread safe: No
|
||||
* - Required Privileges: None
|
||||
*
|
||||
* @note
|
||||
* API Group:
|
||||
* - Initialization: No
|
||||
* - Run time: Yes
|
||||
* - De-initialization: No
|
||||
*
|
||||
*/
|
||||
void osi_get_hw_features(void *base, struct osi_hw_features *hw_feat);
|
||||
void common_get_hw_features(void *base, struct osi_hw_features *hw_feat);
|
||||
/**
|
||||
* @brief osi_memset - osi memset
|
||||
*
|
||||
|
||||
@@ -1267,6 +1267,68 @@ int osi_l3l4_filter(struct osi_core_priv_data *const osi_core,
|
||||
const unsigned int dma_chan,
|
||||
const unsigned int is_l4_filter);
|
||||
|
||||
/**
|
||||
* @brief osi_get_mac_version - Reading MAC version
|
||||
*
|
||||
* @note
|
||||
* Algorithm:
|
||||
* - Reads MAC version and check whether its valid or not.
|
||||
*
|
||||
* @param[in] addr: io-remap MAC base address.
|
||||
* @param[in] mac_ver: holds mac version.
|
||||
*
|
||||
* @pre MAC has to be out of reset.
|
||||
*
|
||||
* @note
|
||||
* Traceability Details:
|
||||
* - SWUD_ID: ETHERNET_NVETHERNETRM_015
|
||||
*
|
||||
* @note
|
||||
* Classification:
|
||||
* - Interrupt: No
|
||||
* - Signal handler: No
|
||||
* - Thread safe: No
|
||||
* - Required Privileges: None
|
||||
*
|
||||
* @note
|
||||
* API Group:
|
||||
* - Initialization: No
|
||||
* - Run time: Yes
|
||||
* - De-initialization: No
|
||||
*
|
||||
* @retval 0 on success
|
||||
* @retval -1 on failure.
|
||||
*/
|
||||
int osi_get_mac_version(void *addr, unsigned int *mac_ver);
|
||||
|
||||
/**
|
||||
* @brief osi_get_hw_features - Reading MAC HW features
|
||||
*
|
||||
* @param[in] base: io-remap MAC base address.
|
||||
* @param[in] hw_feat: holds the supported features of the hardware.
|
||||
*
|
||||
* @pre MAC has to be out of reset.
|
||||
*
|
||||
* @note
|
||||
* Traceability Details:
|
||||
* - SWUD_ID: ETHERNET_NVETHERNETRM_016
|
||||
*
|
||||
* @note
|
||||
* Classification:
|
||||
* - Interrupt: No
|
||||
* - Signal handler: No
|
||||
* - Thread safe: No
|
||||
* - Required Privileges: None
|
||||
*
|
||||
* @note
|
||||
* API Group:
|
||||
* - Initialization: No
|
||||
* - Run time: Yes
|
||||
* - De-initialization: No
|
||||
*
|
||||
*/
|
||||
void osi_get_hw_features(void *base, struct osi_hw_features *hw_feat);
|
||||
|
||||
#ifndef OSI_STRIPPED_LIB
|
||||
/**
|
||||
* @brief osi_validate_core_regs - Read-validate HW registers for func safety.
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <osd.h>
|
||||
#include "eqos_common.h"
|
||||
|
||||
void osi_get_hw_features(void *base, struct osi_hw_features *hw_feat)
|
||||
void common_get_hw_features(void *base, struct osi_hw_features *hw_feat)
|
||||
{
|
||||
unsigned int mac_hfr0;
|
||||
unsigned int mac_hfr1;
|
||||
@@ -108,7 +108,7 @@ void osi_get_hw_features(void *base, struct osi_hw_features *hw_feat)
|
||||
((mac_hfr2 >> 28U) & EQOS_MAC_HFR2_AUXSNAPNUM_MASK);
|
||||
}
|
||||
|
||||
int osi_get_mac_version(void *addr, unsigned int *mac_ver)
|
||||
int common_get_mac_version(void *addr, unsigned int *mac_ver)
|
||||
{
|
||||
unsigned int macver;
|
||||
int ret = 0;
|
||||
|
||||
@@ -664,6 +664,26 @@ int osi_read_mmc(struct osi_core_priv_data *const osi_core)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void osi_get_hw_features(void *base, struct osi_hw_features *hw_feat)
|
||||
{
|
||||
if ((base != OSI_NULL) && (hw_feat != OSI_NULL)) {
|
||||
common_get_hw_features(base, hw_feat);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int osi_get_mac_version(void *addr, unsigned int *mac_ver)
|
||||
{
|
||||
int ret = -1;
|
||||
|
||||
if ((addr != OSI_NULL) && (mac_ver != OSI_NULL)) {
|
||||
return common_get_mac_version(addr, mac_ver);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef OSI_STRIPPED_LIB
|
||||
int osi_validate_core_regs(struct osi_core_priv_data *const osi_core)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user