Commit 050eb19c authored by Grzegorz Jaszczyk's avatar Grzegorz Jaszczyk Committed by Marcin Wojtas
Browse files

marvell: comphy: initialize common phy selector for AP mode



Configuring common phy selector which was missing for AP mode.

Change-Id: I15be1ba50b8aafe9094734abec139d72c18bb224
Signed-off-by: default avatarGrzegorz Jaszczyk <jaz@semihalf.com>
parent 8e8ec8cf
...@@ -209,8 +209,10 @@ static void mvebu_cp110_comphy_set_phy_selector(uint64_t comphy_base, ...@@ -209,8 +209,10 @@ static void mvebu_cp110_comphy_set_phy_selector(uint64_t comphy_base,
* as SFI1/XFI1 available only for CP115. * as SFI1/XFI1 available only for CP115.
*/ */
if ((mode == COMPHY_SGMII_MODE || if ((mode == COMPHY_SGMII_MODE ||
mode == COMPHY_HS_SGMII_MODE || mode == COMPHY_HS_SGMII_MODE ||
mode == COMPHY_SFI_MODE || mode == COMPHY_XFI_MODE) mode == COMPHY_SFI_MODE ||
mode == COMPHY_XFI_MODE ||
mode == COMPHY_AP_MODE)
&& COMPHY_GET_ID(comphy_mode) == 1) && COMPHY_GET_ID(comphy_mode) == 1)
reg |= COMMON_SELECTOR_COMPHY4_PORT1 << reg |= COMMON_SELECTOR_COMPHY4_PORT1 <<
comphy_offset; comphy_offset;
...@@ -2225,12 +2227,16 @@ int mvebu_cp110_comphy_xfi_rx_training(uint64_t comphy_base, ...@@ -2225,12 +2227,16 @@ int mvebu_cp110_comphy_xfi_rx_training(uint64_t comphy_base,
* the network registers like: MG, AP, MAC, PCS, Serdes etc.) * the network registers like: MG, AP, MAC, PCS, Serdes etc.)
*/ */
static int mvebu_cp110_comphy_ap_power_on(uint64_t comphy_base, static int mvebu_cp110_comphy_ap_power_on(uint64_t comphy_base,
uint8_t comphy_index) uint8_t comphy_index,
uint32_t comphy_mode)
{ {
uint32_t mask, data; uint32_t mask, data;
uintptr_t comphy_addr = comphy_addr = uintptr_t comphy_addr = comphy_addr =
COMPHY_ADDR(comphy_base, comphy_index); COMPHY_ADDR(comphy_base, comphy_index);
/* configure phy selector for XFI/SFI */
mvebu_cp110_comphy_set_phy_selector(comphy_base, comphy_index,
comphy_mode);
debug_enter(); debug_enter();
debug("stage: RFU configurations - hard reset comphy\n"); debug("stage: RFU configurations - hard reset comphy\n");
/* RFU configurations - hard reset comphy */ /* RFU configurations - hard reset comphy */
...@@ -2323,7 +2329,8 @@ int mvebu_cp110_comphy_power_on(uint64_t comphy_base, uint8_t comphy_index, ...@@ -2323,7 +2329,8 @@ int mvebu_cp110_comphy_power_on(uint64_t comphy_base, uint8_t comphy_index,
comphy_mode); comphy_mode);
break; break;
case (COMPHY_AP_MODE): case (COMPHY_AP_MODE):
err = mvebu_cp110_comphy_ap_power_on(comphy_base, comphy_index); err = mvebu_cp110_comphy_ap_power_on(comphy_base, comphy_index,
comphy_mode);
break; break;
default: default:
ERROR("comphy%d: unsupported comphy mode\n", comphy_index); ERROR("comphy%d: unsupported comphy mode\n", comphy_index);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment