Lines Matching defs:comphy_index
121 static int mvebu_a3700_comphy_set_phy_selector(uint8_t comphy_index,
131 if (comphy_index == COMPHY_LANE2)
139 if (comphy_index == COMPHY_LANE0)
141 else if (comphy_index == COMPHY_LANE1)
150 if (comphy_index == COMPHY_LANE2)
152 else if (comphy_index == COMPHY_LANE0)
160 if (comphy_index == COMPHY_LANE1)
173 ERROR("COMPHY[%d] mode[%d] is invalid\n", comphy_index, mode);
190 static int mvebu_a3700_comphy_get_mode(uint8_t comphy_index)
195 switch (comphy_index) {
287 static int mvebu_a3700_comphy_sata_power_on(uint8_t comphy_index,
298 ret = mvebu_a3700_comphy_set_phy_selector(comphy_index, comphy_mode);
370 static int mvebu_a3700_comphy_sgmii_power_on(uint8_t comphy_index,
383 ret = mvebu_a3700_comphy_set_phy_selector(comphy_index, comphy_mode);
392 if (comphy_index == COMPHY_LANE0) {
407 offset = MVEBU_COMPHY_REG_BASE + COMPHY_PHY_CFG1_OFFSET(comphy_index);
430 comphy_index);
535 reg_set(MVEBU_COMPHY_REG_BASE + COMPHY_PHY_CFG1_OFFSET(comphy_index),
544 COMPHY_PHY_STATUS_OFFSET(comphy_index),
549 ERROR("Failed to lock PLL for SGMII PHY %d\n", comphy_index);
556 reg_set(MVEBU_COMPHY_REG_BASE + COMPHY_PHY_CFG1_OFFSET(comphy_index),
566 reg_set(MVEBU_COMPHY_REG_BASE + COMPHY_PHY_CFG1_OFFSET(comphy_index),
570 COMPHY_PHY_STATUS_OFFSET(comphy_index),
575 ERROR("Failed to lock PLL for SGMII PHY %d\n", comphy_index);
580 COMPHY_PHY_STATUS_OFFSET(comphy_index),
584 ERROR("Failed to init RX of SGMII PHY %d\n", comphy_index);
593 static int mvebu_a3700_comphy_sgmii_power_off(uint8_t comphy_index)
602 offset = MVEBU_COMPHY_REG_BASE + COMPHY_PHY_CFG1_OFFSET(comphy_index);
610 static int mvebu_a3700_comphy_usb3_power_on(uint8_t comphy_index,
624 ret = mvebu_a3700_comphy_set_phy_selector(comphy_index, comphy_mode);
630 if (comphy_index == COMPHY_LANE2) {
785 if (comphy_index == COMPHY_LANE2) {
808 static int mvebu_a3700_comphy_pcie_power_on(uint8_t comphy_index,
819 ret = mvebu_a3700_comphy_set_phy_selector(comphy_index, comphy_mode);
907 int mvebu_3700_comphy_power_on(uint8_t comphy_index, uint32_t comphy_mode)
916 ret = mvebu_a3700_comphy_sata_power_on(comphy_index,
921 ret = mvebu_a3700_comphy_sgmii_power_on(comphy_index,
926 ret = mvebu_a3700_comphy_usb3_power_on(comphy_index,
930 ret = mvebu_a3700_comphy_pcie_power_on(comphy_index,
934 ERROR("comphy%d: unsupported comphy mode\n", comphy_index);
978 int mvebu_3700_comphy_power_off(uint8_t comphy_index, uint32_t comphy_mode)
991 mode = mvebu_a3700_comphy_get_mode(comphy_index);
997 err = mvebu_a3700_comphy_sgmii_power_off(comphy_index);
1009 comphy_index, mode);
1043 int mvebu_3700_comphy_is_pll_locked(uint8_t comphy_index, uint32_t comphy_mode)
1057 comphy_index, mode);