Lines Matching refs:comphy_base
95 uint64_t comphy_base) in mvebu_cp110_get_ap_and_cp_nr() argument
100 *ap_nr = (((comphy_base & ~0xffffff) - MVEBU_AP_IO_BASE(0)) / in mvebu_cp110_get_ap_and_cp_nr()
104 *cp_nr = (((comphy_base & ~0xffffff) - MVEBU_AP_IO_BASE(*ap_nr)) / in mvebu_cp110_get_ap_and_cp_nr()
108 comphy_base, (unsigned long)MVEBU_AP_IO_BASE(*ap_nr), in mvebu_cp110_get_ap_and_cp_nr()
113 static void mvebu_cp110_comphy_clr_pipe_selector(uint64_t comphy_base, in mvebu_cp110_comphy_clr_pipe_selector() argument
121 reg = mmio_read_32(comphy_base + COMMON_SELECTOR_PIPE_REG_OFFSET); in mvebu_cp110_comphy_clr_pipe_selector()
126 mmio_write_32(comphy_base + COMMON_SELECTOR_PIPE_REG_OFFSET, in mvebu_cp110_comphy_clr_pipe_selector()
132 static void mvebu_cp110_comphy_clr_phy_selector(uint64_t comphy_base, in mvebu_cp110_comphy_clr_phy_selector() argument
140 reg = mmio_read_32(comphy_base + COMMON_SELECTOR_PHY_REG_OFFSET); in mvebu_cp110_comphy_clr_phy_selector()
150 mmio_write_32(comphy_base + COMMON_SELECTOR_PHY_REG_OFFSET, in mvebu_cp110_comphy_clr_phy_selector()
156 static void mvebu_cp110_comphy_set_phy_selector(uint64_t comphy_base, in mvebu_cp110_comphy_set_phy_selector() argument
167 mvebu_cp110_comphy_clr_pipe_selector(comphy_base, comphy_index); in mvebu_cp110_comphy_set_phy_selector()
175 reg = mmio_read_32(comphy_base + COMMON_SELECTOR_PHY_REG_OFFSET); in mvebu_cp110_comphy_set_phy_selector()
246 mmio_write_32(comphy_base + COMMON_SELECTOR_PHY_REG_OFFSET, reg); in mvebu_cp110_comphy_set_phy_selector()
250 static void mvebu_cp110_comphy_set_pipe_selector(uint64_t comphy_base, in mvebu_cp110_comphy_set_pipe_selector() argument
262 mvebu_cp110_comphy_clr_phy_selector(comphy_base, comphy_index); in mvebu_cp110_comphy_set_pipe_selector()
264 reg = mmio_read_32(comphy_base + COMMON_SELECTOR_PIPE_REG_OFFSET); in mvebu_cp110_comphy_set_pipe_selector()
298 mmio_write_32(comphy_base + COMMON_SELECTOR_PIPE_REG_OFFSET, reg | 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
310 sd_ip_addr = SD_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), in mvebu_cp110_comphy_is_pll_locked()
354 static int mvebu_cp110_comphy_sata_power_on(uint64_t comphy_base, in mvebu_cp110_comphy_sata_power_on() argument
364 mvebu_cp110_get_ap_and_cp_nr(&ap_nr, &cp_nr, comphy_base); in mvebu_cp110_comphy_sata_power_on()
372 mvebu_cp110_comphy_set_phy_selector(comphy_base, in mvebu_cp110_comphy_sata_power_on()
375 hpipe_addr = HPIPE_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), in mvebu_cp110_comphy_sata_power_on()
377 sd_ip_addr = SD_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), in mvebu_cp110_comphy_sata_power_on()
379 comphy_addr = COMPHY_ADDR(comphy_base, comphy_index); in mvebu_cp110_comphy_sata_power_on()
679 static int mvebu_cp110_comphy_sgmii_power_on(uint64_t comphy_base, in mvebu_cp110_comphy_sgmii_power_on() argument
688 hpipe_addr = HPIPE_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), in mvebu_cp110_comphy_sgmii_power_on()
690 sd_ip_addr = SD_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), 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()
805 ret = mvebu_cp110_comphy_is_pll_locked(comphy_base, comphy_index); in mvebu_cp110_comphy_sgmii_power_on()
837 static int mvebu_cp110_comphy_xfi_power_on(uint64_t comphy_base, in mvebu_cp110_comphy_xfi_power_on() argument
848 mvebu_cp110_get_ap_and_cp_nr(&ap_nr, &cp_nr, comphy_base); in mvebu_cp110_comphy_xfi_power_on()
882 hpipe_addr = HPIPE_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), in mvebu_cp110_comphy_xfi_power_on()
884 sd_ip_addr = SD_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), 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()
1257 static int mvebu_cp110_comphy_pcie_power_on(uint64_t comphy_base, in mvebu_cp110_comphy_pcie_power_on() argument
1282 hpipe_addr = HPIPE_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), in mvebu_cp110_comphy_pcie_power_on()
1284 comphy_addr = COMPHY_ADDR(comphy_base, comphy_index); in mvebu_cp110_comphy_pcie_power_on()
1291 reg = mmio_read_32(SYS_CTRL_FROM_COMPHY_ADDR(comphy_base) + in mvebu_cp110_comphy_pcie_power_on()
1305 mmio_write_32(SYS_CTRL_FROM_COMPHY_ADDR(comphy_base) + 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()
1320 reg = mmio_read_32(DFX_FROM_COMPHY_ADDR(comphy_base) + in mvebu_cp110_comphy_pcie_power_on()
1338 reg_set(comphy_base + COMMON_PHY_SD_CTRL1, in mvebu_cp110_comphy_pcie_power_on()
1343 reg_set(comphy_base + COMMON_PHY_SD_CTRL1, data, mask); in mvebu_cp110_comphy_pcie_power_on()
1355 reg_set(DFX_FROM_COMPHY_ADDR(comphy_base) + in mvebu_cp110_comphy_pcie_power_on()
1679 reg_set(comphy_base + COMMON_PHY_SD_CTRL1, data, mask); in mvebu_cp110_comphy_pcie_power_on()
1689 COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), 0) + in mvebu_cp110_comphy_pcie_power_on()
1723 reg_set(comphy_base + COMMON_PHY_SD_CTRL1, in mvebu_cp110_comphy_pcie_power_on()
1731 COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), i) + in mvebu_cp110_comphy_pcie_power_on()
1750 static int mvebu_cp110_comphy_rxaui_power_on(uint64_t comphy_base, in mvebu_cp110_comphy_rxaui_power_on() argument
1759 hpipe_addr = HPIPE_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), in mvebu_cp110_comphy_rxaui_power_on()
1761 comphy_addr = COMPHY_ADDR(comphy_base, comphy_index); in mvebu_cp110_comphy_rxaui_power_on()
1762 sd_ip_addr = SD_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), 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()
1777 reg_set(comphy_base + COMMON_PHY_SD_CTRL1, in mvebu_cp110_comphy_rxaui_power_on()
1782 reg_set(comphy_base + COMMON_PHY_SD_CTRL1, in mvebu_cp110_comphy_rxaui_power_on()
1937 static int mvebu_cp110_comphy_usb3_power_on(uint64_t comphy_base, 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()
1951 mvebu_cp110_get_ap_and_cp_nr(&ap_nr, &cp_nr, comphy_base); in mvebu_cp110_comphy_usb3_power_on()
1958 hpipe_addr = HPIPE_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), 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
2092 hpipe_addr = HPIPE_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), in rx_pre_train()
2133 int mvebu_cp110_comphy_xfi_rx_training(uint64_t comphy_base, in mvebu_cp110_comphy_xfi_rx_training() argument
2142 mvebu_cp110_get_ap_and_cp_nr(&ap_nr, &cp_nr, comphy_base); in mvebu_cp110_comphy_xfi_rx_training()
2144 hpipe_addr = HPIPE_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), in mvebu_cp110_comphy_xfi_rx_training()
2149 rx_pre_train(comphy_base, comphy_index); in mvebu_cp110_comphy_xfi_rx_training()
2299 static int mvebu_cp110_comphy_ap_power_on(uint64_t comphy_base, 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()
2325 mvebu_cp110_get_ap_and_cp_nr(&ap_nr, &cp_nr, comphy_base); in mvebu_cp110_comphy_ap_power_on()
2337 int mvebu_cp110_comphy_digital_reset(uint64_t comphy_base, in mvebu_cp110_comphy_digital_reset() argument
2345 sd_ip_addr = SD_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), in mvebu_cp110_comphy_digital_reset()
2368 int mvebu_cp110_comphy_power_on(uint64_t comphy_base, in mvebu_cp110_comphy_power_on() argument
2380 err = mvebu_cp110_comphy_sata_power_on(comphy_base, in mvebu_cp110_comphy_power_on()
2386 err = mvebu_cp110_comphy_sgmii_power_on(comphy_base, in mvebu_cp110_comphy_power_on()
2393 err = mvebu_cp110_comphy_xfi_power_on(comphy_base, in mvebu_cp110_comphy_power_on()
2399 err = mvebu_cp110_comphy_pcie_power_on(comphy_base, in mvebu_cp110_comphy_power_on()
2404 err = mvebu_cp110_comphy_rxaui_power_on(comphy_base, in mvebu_cp110_comphy_power_on()
2410 err = mvebu_cp110_comphy_usb3_power_on(comphy_base, in mvebu_cp110_comphy_power_on()
2415 err = mvebu_cp110_comphy_ap_power_on(comphy_base, 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
2460 data = mmio_read_32(comphy_base + in mvebu_cp110_comphy_power_off()
2468 mvebu_cp110_get_ap_and_cp_nr(&ap_nr, &cp_nr, comphy_base); in mvebu_cp110_comphy_power_off()
2476 sd_ip_addr = SD_ADDR(COMPHY_PIPE_FROM_COMPHY_ADDR(comphy_base), in mvebu_cp110_comphy_power_off()
2478 comphy_ip_addr = COMPHY_ADDR(comphy_base, comphy_index); in mvebu_cp110_comphy_power_off()
2496 data = mmio_read_32(SYS_CTRL_FROM_COMPHY_ADDR(comphy_base) + in mvebu_cp110_comphy_power_off()
2510 mmio_write_32(SYS_CTRL_FROM_COMPHY_ADDR(comphy_base) + 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()