Lines Matching full:path
4 /* A library for configuring path from GMAC/GDM to target PHY
18 int (*set_path)(struct mtk_eth *eth, int path);
21 static const char *mtk_eth_path_name(int path) in mtk_eth_path_name() argument
23 switch (path) { in mtk_eth_path_name()
39 return "unknown path"; in mtk_eth_path_name()
43 static int set_mux_gdm1_to_gmac1_esw(struct mtk_eth *eth, int path) in set_mux_gdm1_to_gmac1_esw() argument
48 switch (path) { in set_mux_gdm1_to_gmac1_esw()
68 dev_dbg(eth->dev, "path %s in %s updated = %d\n", in set_mux_gdm1_to_gmac1_esw()
69 mtk_eth_path_name(path), __func__, updated); in set_mux_gdm1_to_gmac1_esw()
74 static int set_mux_gmac2_gmac0_to_gephy(struct mtk_eth *eth, int path) in set_mux_gmac2_gmac0_to_gephy() argument
79 switch (path) { in set_mux_gmac2_gmac0_to_gephy()
91 dev_dbg(eth->dev, "path %s in %s updated = %d\n", in set_mux_gmac2_gmac0_to_gephy()
92 mtk_eth_path_name(path), __func__, updated); in set_mux_gmac2_gmac0_to_gephy()
97 static int set_mux_u3_gmac2_to_qphy(struct mtk_eth *eth, int path) in set_mux_u3_gmac2_to_qphy() argument
102 switch (path) { in set_mux_u3_gmac2_to_qphy()
114 dev_dbg(eth->dev, "path %s in %s updated = %d\n", in set_mux_u3_gmac2_to_qphy()
115 mtk_eth_path_name(path), __func__, updated); in set_mux_u3_gmac2_to_qphy()
120 static int set_mux_gmac1_gmac2_to_sgmii_rgmii(struct mtk_eth *eth, int path) in set_mux_gmac1_gmac2_to_sgmii_rgmii() argument
125 switch (path) { in set_mux_gmac1_gmac2_to_sgmii_rgmii()
137 if ((path == MTK_GMAC1_RGMII && val == SYSCFG0_SGMII_GMAC1) || in set_mux_gmac1_gmac2_to_sgmii_rgmii()
138 (path == MTK_GMAC2_RGMII && val == SYSCFG0_SGMII_GMAC2)) in set_mux_gmac1_gmac2_to_sgmii_rgmii()
152 dev_dbg(eth->dev, "path %s in %s updated = %d\n", in set_mux_gmac1_gmac2_to_sgmii_rgmii()
153 mtk_eth_path_name(path), __func__, updated); in set_mux_gmac1_gmac2_to_sgmii_rgmii()
158 static int set_mux_gmac12_to_gephy_sgmii(struct mtk_eth *eth, int path) in set_mux_gmac12_to_gephy_sgmii() argument
165 switch (path) { in set_mux_gmac12_to_gephy_sgmii()
183 dev_dbg(eth->dev, "path %s in %s updated = %d\n", in set_mux_gmac12_to_gephy_sgmii()
184 mtk_eth_path_name(path), __func__, updated); in set_mux_gmac12_to_gephy_sgmii()
213 static int mtk_eth_mux_setup(struct mtk_eth *eth, int path) in mtk_eth_mux_setup() argument
217 if (!MTK_HAS_CAPS(eth->soc->caps, path)) { in mtk_eth_mux_setup()
218 dev_err(eth->dev, "path %s isn't support on the SoC\n", in mtk_eth_mux_setup()
219 mtk_eth_path_name(path)); in mtk_eth_mux_setup()
226 /* Setup MUX in path fabric */ in mtk_eth_mux_setup()
229 err = mtk_eth_muxc[i].set_path(eth, path); in mtk_eth_mux_setup()
244 int path; in mtk_gmac_sgmii_path_setup() local
246 path = (mac_id == 0) ? MTK_ETH_PATH_GMAC1_SGMII : in mtk_gmac_sgmii_path_setup()
249 /* Setup proper MUXes along the path */ in mtk_gmac_sgmii_path_setup()
250 return mtk_eth_mux_setup(eth, path); in mtk_gmac_sgmii_path_setup()
255 int path = 0; in mtk_gmac_gephy_path_setup() local
258 path = MTK_ETH_PATH_GMAC2_GEPHY; in mtk_gmac_gephy_path_setup()
260 if (!path) in mtk_gmac_gephy_path_setup()
263 /* Setup proper MUXes along the path */ in mtk_gmac_gephy_path_setup()
264 return mtk_eth_mux_setup(eth, path); in mtk_gmac_gephy_path_setup()
269 int path; in mtk_gmac_rgmii_path_setup() local
271 path = (mac_id == 0) ? MTK_ETH_PATH_GMAC1_RGMII : in mtk_gmac_rgmii_path_setup()
274 /* Setup proper MUXes along the path */ in mtk_gmac_rgmii_path_setup()
275 return mtk_eth_mux_setup(eth, path); in mtk_gmac_rgmii_path_setup()