mirror of
git://nv-tegra.nvidia.com/kernel/nvethernetrm.git
synced 2025-12-24 10:34:24 +03:00
osi: common: Fix mgbe xpcs and osi_common code
- Return success xpcs-base is null for now. - Add is mac enable support for MGBE. - Call HW type common API base on MAC HW. - Add generic channel mask macro. Bug 200718904 Change-Id: Icc228697d0464c18af77312457a6bcfbf484ab7d Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2532466 Reviewed-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
This commit is contained in:
committed by
Bhadram Varka
parent
158bc9041f
commit
eea36c7572
@@ -135,6 +135,13 @@ int xpcs_start(struct osi_core_priv_data *osi_core)
|
||||
int ret = 0;
|
||||
int cond = 1;
|
||||
|
||||
if (osi_core->xpcs_base == OSI_NULL) {
|
||||
OSI_CORE_ERR(OSI_NULL, OSI_LOG_ARG_HW_FAIL,
|
||||
"XPCS base is NULL", 0ULL);
|
||||
/* TODO: Remove this once silicon arrives */
|
||||
return 0;
|
||||
}
|
||||
|
||||
ctrl = xpcs_read(xpcs_base, XPCS_SR_MII_CTRL);
|
||||
ctrl |= XPCS_SR_MII_CTRL_AN_ENABLE;
|
||||
xpcs_write(xpcs_base, XPCS_SR_MII_CTRL, ctrl);
|
||||
@@ -205,8 +212,12 @@ int xpcs_init(struct osi_core_priv_data *osi_core)
|
||||
unsigned int ctrl = 0;
|
||||
int cond = 1;
|
||||
|
||||
if (osi_core->xpcs_base == OSI_NULL)
|
||||
return -1;
|
||||
if (osi_core->xpcs_base == OSI_NULL) {
|
||||
OSI_CORE_ERR(OSI_NULL, OSI_LOG_ARG_HW_FAIL,
|
||||
"XPCS base is NULL", 0ULL);
|
||||
/* TODO: Remove this once silicon arrives */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Switching to USXGMII Mode based on
|
||||
* XPCS programming guideline 7.6
|
||||
|
||||
Reference in New Issue
Block a user