Lines Matching full:eth

18 	int		(*set_path)(struct mtk_eth *eth, u64 path);
43 static int set_mux_gdm1_to_gmac1_esw(struct mtk_eth *eth, u64 path) in set_mux_gdm1_to_gmac1_esw() argument
62 if (mtk_is_netsys_v3_or_greater(eth)) in set_mux_gdm1_to_gmac1_esw()
68 mtk_m32(eth, mask, set, reg); in set_mux_gdm1_to_gmac1_esw()
70 dev_dbg(eth->dev, "path %s in %s updated = %d\n", in set_mux_gdm1_to_gmac1_esw()
76 static int set_mux_gmac2_gmac0_to_gephy(struct mtk_eth *eth, u64 path) in set_mux_gmac2_gmac0_to_gephy() argument
91 regmap_update_bits(eth->infra, INFRA_MISC2, GEPHY_MAC_SEL, val); in set_mux_gmac2_gmac0_to_gephy()
93 dev_dbg(eth->dev, "path %s in %s updated = %d\n", in set_mux_gmac2_gmac0_to_gephy()
99 static int set_mux_u3_gmac2_to_qphy(struct mtk_eth *eth, u64 path) in set_mux_u3_gmac2_to_qphy() argument
106 if (MTK_HAS_CAPS(eth->soc->caps, MTK_U3_COPHY_V2)) { in set_mux_u3_gmac2_to_qphy()
122 regmap_update_bits(eth->infra, reg, mask, val); in set_mux_u3_gmac2_to_qphy()
124 dev_dbg(eth->dev, "path %s in %s updated = %d\n", in set_mux_u3_gmac2_to_qphy()
130 static int set_mux_gmac1_gmac2_to_sgmii_rgmii(struct mtk_eth *eth, u64 path) in set_mux_gmac1_gmac2_to_sgmii_rgmii() argument
144 regmap_read(eth->ethsys, ETHSYS_SYSCFG0, &val); in set_mux_gmac1_gmac2_to_sgmii_rgmii()
159 regmap_update_bits(eth->ethsys, ETHSYS_SYSCFG0, in set_mux_gmac1_gmac2_to_sgmii_rgmii()
162 dev_dbg(eth->dev, "path %s in %s updated = %d\n", in set_mux_gmac1_gmac2_to_sgmii_rgmii()
168 static int set_mux_gmac12_to_gephy_sgmii(struct mtk_eth *eth, u64 path) in set_mux_gmac12_to_gephy_sgmii() argument
173 regmap_read(eth->ethsys, ETHSYS_SYSCFG0, &val); in set_mux_gmac12_to_gephy_sgmii()
190 regmap_update_bits(eth->ethsys, ETHSYS_SYSCFG0, in set_mux_gmac12_to_gephy_sgmii()
193 dev_dbg(eth->dev, "path %s in %s updated = %d\n", in set_mux_gmac12_to_gephy_sgmii()
223 static int mtk_eth_mux_setup(struct mtk_eth *eth, u64 path) in mtk_eth_mux_setup() argument
227 if (!MTK_HAS_CAPS(eth->soc->caps, path)) { in mtk_eth_mux_setup()
228 dev_err(eth->dev, "path %s isn't support on the SoC\n", in mtk_eth_mux_setup()
233 if (!MTK_HAS_CAPS(eth->soc->caps, MTK_MUX)) in mtk_eth_mux_setup()
238 if (MTK_HAS_CAPS(eth->soc->caps, mtk_eth_muxc[i].cap_bit)) { in mtk_eth_mux_setup()
239 err = mtk_eth_muxc[i].set_path(eth, path); in mtk_eth_mux_setup()
243 dev_dbg(eth->dev, "mux %s isn't present on the SoC\n", in mtk_eth_mux_setup()
252 int mtk_gmac_sgmii_path_setup(struct mtk_eth *eth, int mac_id) in mtk_gmac_sgmii_path_setup() argument
260 return mtk_eth_mux_setup(eth, path); in mtk_gmac_sgmii_path_setup()
263 int mtk_gmac_gephy_path_setup(struct mtk_eth *eth, int mac_id) in mtk_gmac_gephy_path_setup() argument
274 return mtk_eth_mux_setup(eth, path); in mtk_gmac_gephy_path_setup()
277 int mtk_gmac_rgmii_path_setup(struct mtk_eth *eth, int mac_id) in mtk_gmac_rgmii_path_setup() argument
285 return mtk_eth_mux_setup(eth, path); in mtk_gmac_rgmii_path_setup()