Lines Matching refs:comphy_index

69 #define COMPHY_TRX_RELATIVE_ADDR(comphy_index)	(comphy_train_base + \  argument
70 (comphy_index) * COMPHY_TRX_TRAIN_COMPHY_OFFS)
114 uint8_t comphy_index) in mvebu_cp110_comphy_clr_pipe_selector() argument
118 COMMON_SELECTOR_COMPHYN_FIELD_WIDTH * comphy_index; in mvebu_cp110_comphy_clr_pipe_selector()
133 uint8_t comphy_index) in mvebu_cp110_comphy_clr_phy_selector() argument
137 COMMON_SELECTOR_COMPHYN_FIELD_WIDTH * comphy_index; in mvebu_cp110_comphy_clr_phy_selector()
157 uint8_t comphy_index, uint32_t comphy_mode) in mvebu_cp110_comphy_set_phy_selector() argument
161 COMMON_SELECTOR_COMPHYN_FIELD_WIDTH * comphy_index; in mvebu_cp110_comphy_set_phy_selector()
167 mvebu_cp110_comphy_clr_pipe_selector(comphy_base, comphy_index); in mvebu_cp110_comphy_set_phy_selector()
183 switch (comphy_index) { in mvebu_cp110_comphy_set_phy_selector()
251 uint8_t comphy_index, uint32_t comphy_mode) in mvebu_cp110_comphy_set_pipe_selector() argument
254 uint32_t shift = COMMON_SELECTOR_COMPHYN_FIELD_WIDTH * comphy_index; in mvebu_cp110_comphy_set_pipe_selector()
262 mvebu_cp110_comphy_clr_phy_selector(comphy_base, comphy_index); in mvebu_cp110_comphy_set_pipe_selector()
275 if (comphy_index == COMPHY_LANE0 || in mvebu_cp110_comphy_set_pipe_selector()
276 comphy_index == COMPHY_LANE5) in mvebu_cp110_comphy_set_pipe_selector()
278 comphy_index, mode); in mvebu_cp110_comphy_set_pipe_selector()
285 if (comphy_index == COMPHY_LANE1 || in mvebu_cp110_comphy_set_pipe_selector()
286 comphy_index == COMPHY_LANE4) in mvebu_cp110_comphy_set_pipe_selector()
289 ERROR("COMPHY[%d] mode[%d] is invalid\n", comphy_index, in mvebu_cp110_comphy_set_pipe_selector()
294 ERROR("COMPHY[%d] mode[%d] is invalid\n", comphy_index, mode); in mvebu_cp110_comphy_set_pipe_selector()
302 int mvebu_cp110_comphy_is_pll_locked(uint64_t comphy_base, uint8_t comphy_index) in mvebu_cp110_comphy_is_pll_locked() argument
311 comphy_index); in mvebu_cp110_comphy_is_pll_locked()
355 uint8_t comphy_index, uint32_t comphy_mode) in mvebu_cp110_comphy_sata_power_on() argument
367 &sata_static_values_tab[ap_nr][cp_nr][comphy_index]; in mvebu_cp110_comphy_sata_power_on()
373 comphy_index, comphy_mode); in mvebu_cp110_comphy_sata_power_on()
376 comphy_index); in mvebu_cp110_comphy_sata_power_on()
378 comphy_index); in mvebu_cp110_comphy_sata_power_on()
379 comphy_addr = COMPHY_ADDR(comphy_base, comphy_index); in mvebu_cp110_comphy_sata_power_on()
680 uint8_t comphy_index, uint32_t comphy_mode) in mvebu_cp110_comphy_sgmii_power_on() argument
689 comphy_index); in mvebu_cp110_comphy_sgmii_power_on()
691 comphy_index); in mvebu_cp110_comphy_sgmii_power_on()
692 comphy_addr = COMPHY_ADDR(comphy_base, comphy_index); in mvebu_cp110_comphy_sgmii_power_on()
695 mvebu_cp110_comphy_set_phy_selector(comphy_base, comphy_index, in mvebu_cp110_comphy_sgmii_power_on()
723 ERROR("unsupported SGMII speed on comphy%d\n", comphy_index); in mvebu_cp110_comphy_sgmii_power_on()
805 ret = mvebu_cp110_comphy_is_pll_locked(comphy_base, comphy_index); in mvebu_cp110_comphy_sgmii_power_on()
838 uint8_t comphy_index, in mvebu_cp110_comphy_xfi_power_on() argument
850 if (rx_trainng_done[ap_nr][cp_nr][comphy_index]) { in mvebu_cp110_comphy_xfi_power_on()
852 __func__, ap_nr, cp_nr, comphy_index); in mvebu_cp110_comphy_xfi_power_on()
857 &xfi_static_values_tab[ap_nr][cp_nr][comphy_index]; in mvebu_cp110_comphy_xfi_power_on()
860 __func__, ap_nr, cp_nr, comphy_index); in mvebu_cp110_comphy_xfi_power_on()
869 ap_nr, cp_nr, comphy_index); in mvebu_cp110_comphy_xfi_power_on()
871 ap_nr, cp_nr, comphy_index); in mvebu_cp110_comphy_xfi_power_on()
878 ERROR("comphy:%d: unsupported sfi/xfi speed\n", comphy_index); in mvebu_cp110_comphy_xfi_power_on()
883 comphy_index); in mvebu_cp110_comphy_xfi_power_on()
885 comphy_index); in mvebu_cp110_comphy_xfi_power_on()
886 comphy_addr = COMPHY_ADDR(comphy_base, comphy_index); in mvebu_cp110_comphy_xfi_power_on()
889 mvebu_cp110_comphy_set_phy_selector(comphy_base, comphy_index, in mvebu_cp110_comphy_xfi_power_on()
1245 data = mmio_read_32(COMPHY_TRX_RELATIVE_ADDR(comphy_index)); in mvebu_cp110_comphy_xfi_power_on()
1247 mmio_write_32(COMPHY_TRX_RELATIVE_ADDR(comphy_index), data); in mvebu_cp110_comphy_xfi_power_on()
1250 mmio_write_32(COMPHY_TRX_RELATIVE_ADDR(comphy_index), data); in mvebu_cp110_comphy_xfi_power_on()
1258 uint8_t comphy_index, uint32_t comphy_mode) in mvebu_cp110_comphy_pcie_power_on() argument
1283 comphy_index); in mvebu_cp110_comphy_pcie_power_on()
1284 comphy_addr = COMPHY_ADDR(comphy_base, comphy_index); in mvebu_cp110_comphy_pcie_power_on()
1293 switch (comphy_index) { in mvebu_cp110_comphy_pcie_power_on()
1310 mvebu_cp110_comphy_set_pipe_selector(comphy_base, comphy_index, in mvebu_cp110_comphy_pcie_power_on()
1322 if (comphy_index == COMPHY_LANE4 || comphy_index == COMPHY_LANE5) in mvebu_cp110_comphy_pcie_power_on()
1329 debug("On lane %d\n", comphy_index); in mvebu_cp110_comphy_pcie_power_on()
1334 if (comphy_index == COMPHY_LANE0) { in mvebu_cp110_comphy_pcie_power_on()
1351 if (clk_dir && clk_src && (comphy_index == COMPHY_LANE5)) { in mvebu_cp110_comphy_pcie_power_on()
1415 if (comphy_index == 0) { in mvebu_cp110_comphy_pcie_power_on()
1418 } else if (comphy_index == (pcie_width - 1)) { in mvebu_cp110_comphy_pcie_power_on()
1669 if ((pcie_width == PCIE_LNK_X1) || (comphy_index == (pcie_width - 1))) { in mvebu_cp110_comphy_pcie_power_on()
1692 start_lane = comphy_index; in mvebu_cp110_comphy_pcie_power_on()
1693 end_lane = comphy_index + 1; in mvebu_cp110_comphy_pcie_power_on()
1751 uint8_t comphy_index, uint32_t comphy_mode) in mvebu_cp110_comphy_rxaui_power_on() argument
1760 comphy_index); in mvebu_cp110_comphy_rxaui_power_on()
1761 comphy_addr = COMPHY_ADDR(comphy_base, comphy_index); in mvebu_cp110_comphy_rxaui_power_on()
1763 comphy_index); in mvebu_cp110_comphy_rxaui_power_on()
1766 mvebu_cp110_comphy_set_phy_selector(comphy_base, comphy_index, in mvebu_cp110_comphy_rxaui_power_on()
1776 if (comphy_index == 2) { in mvebu_cp110_comphy_rxaui_power_on()
1781 if (comphy_index == 4) { in mvebu_cp110_comphy_rxaui_power_on()
1938 uint8_t comphy_index, uint32_t comphy_mode) in mvebu_cp110_comphy_usb3_power_on() argument
1948 mvebu_cp110_comphy_set_pipe_selector(comphy_base, comphy_index, in mvebu_cp110_comphy_usb3_power_on()
1954 &usb_static_values_tab[ap_nr][cp_nr][comphy_index]; in mvebu_cp110_comphy_usb3_power_on()
1959 comphy_index); in mvebu_cp110_comphy_usb3_power_on()
1960 comphy_addr = COMPHY_ADDR(comphy_base, comphy_index); in mvebu_cp110_comphy_usb3_power_on()
2087 static void rx_pre_train(uint64_t comphy_base, uint8_t comphy_index) in rx_pre_train() argument
2093 comphy_index); in rx_pre_train()
2134 uint8_t comphy_index) in mvebu_cp110_comphy_xfi_rx_training() argument
2145 comphy_index); in mvebu_cp110_comphy_xfi_rx_training()
2149 rx_pre_train(comphy_base, comphy_index); in mvebu_cp110_comphy_xfi_rx_training()
2273 cp_nr, comphy_index); in mvebu_cp110_comphy_xfi_rx_training()
2285 rx_trainng_done[ap_nr][cp_nr][comphy_index] = 1; in mvebu_cp110_comphy_xfi_rx_training()
2300 uint8_t comphy_index, in mvebu_cp110_comphy_ap_power_on() argument
2305 COMPHY_ADDR(comphy_base, comphy_index); in mvebu_cp110_comphy_ap_power_on()
2308 mvebu_cp110_comphy_set_phy_selector(comphy_base, comphy_index, in mvebu_cp110_comphy_ap_power_on()
2326 mg_start_ap_fw(cp_nr, comphy_index); in mvebu_cp110_comphy_ap_power_on()
2338 uint8_t comphy_index, in mvebu_cp110_comphy_digital_reset() argument
2346 comphy_index); in mvebu_cp110_comphy_digital_reset()
2361 comphy_index); in mvebu_cp110_comphy_digital_reset()
2369 uint8_t comphy_index, in mvebu_cp110_comphy_power_on() argument
2381 comphy_index, in mvebu_cp110_comphy_power_on()
2387 comphy_index, in mvebu_cp110_comphy_power_on()
2394 comphy_index, in mvebu_cp110_comphy_power_on()
2400 comphy_index, in mvebu_cp110_comphy_power_on()
2405 comphy_index, in mvebu_cp110_comphy_power_on()
2411 comphy_index, in mvebu_cp110_comphy_power_on()
2415 err = mvebu_cp110_comphy_ap_power_on(comphy_base, comphy_index, in mvebu_cp110_comphy_power_on()
2419 ERROR("comphy%d: unsupported comphy mode\n", comphy_index); in mvebu_cp110_comphy_power_on()
2429 int mvebu_cp110_comphy_power_off(uint64_t comphy_base, uint8_t comphy_index, in mvebu_cp110_comphy_power_off() argument
2462 data >>= (COMMON_SELECTOR_COMPHYN_FIELD_WIDTH * comphy_index); in mvebu_cp110_comphy_power_off()
2470 if (rx_trainng_done[ap_nr][cp_nr][comphy_index]) { in mvebu_cp110_comphy_power_off()
2472 __func__, ap_nr, cp_nr, comphy_index); in mvebu_cp110_comphy_power_off()
2477 comphy_index); in mvebu_cp110_comphy_power_off()
2478 comphy_ip_addr = COMPHY_ADDR(comphy_base, comphy_index); in mvebu_cp110_comphy_power_off()
2498 switch (comphy_index) { in mvebu_cp110_comphy_power_off()
2522 mvebu_cp110_comphy_clr_phy_selector(comphy_base, comphy_index); in mvebu_cp110_comphy_power_off()
2523 mvebu_cp110_comphy_clr_pipe_selector(comphy_base, comphy_index); in mvebu_cp110_comphy_power_off()