Lines Matching refs:comphy_index

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