Lines Matching refs:dwmac
36 struct starfive_dwmac *dwmac = priv; in starfive_dwmac_fix_mac_speed() local
40 rate = clk_get_rate(dwmac->clk_tx); in starfive_dwmac_fix_mac_speed()
53 dev_err(dwmac->dev, "invalid speed %u\n", speed); in starfive_dwmac_fix_mac_speed()
57 err = clk_set_rate(dwmac->clk_tx, rate); in starfive_dwmac_fix_mac_speed()
59 dev_err(dwmac->dev, "failed to set tx rate %lu\n", rate); in starfive_dwmac_fix_mac_speed()
64 struct starfive_dwmac *dwmac = plat_dat->bsp_priv; in starfive_dwmac_set_mode() local
83 dev_err(dwmac->dev, "unsupported interface %d\n", in starfive_dwmac_set_mode()
88 regmap = syscon_regmap_lookup_by_phandle_args(dwmac->dev->of_node, in starfive_dwmac_set_mode()
92 return dev_err_probe(dwmac->dev, PTR_ERR(regmap), "getting the regmap failed\n"); in starfive_dwmac_set_mode()
99 return dev_err_probe(dwmac->dev, err, "error setting phy mode\n"); in starfive_dwmac_set_mode()
101 if (dwmac->data) { in starfive_dwmac_set_mode()
103 dwmac->data->gtxclk_dlychain); in starfive_dwmac_set_mode()
105 return dev_err_probe(dwmac->dev, err, in starfive_dwmac_set_mode()
116 struct starfive_dwmac *dwmac; in starfive_dwmac_probe() local
130 dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL); in starfive_dwmac_probe()
131 if (!dwmac) in starfive_dwmac_probe()
134 dwmac->data = device_get_match_data(&pdev->dev); in starfive_dwmac_probe()
136 dwmac->clk_tx = devm_clk_get_enabled(&pdev->dev, "tx"); in starfive_dwmac_probe()
137 if (IS_ERR(dwmac->clk_tx)) in starfive_dwmac_probe()
138 return dev_err_probe(&pdev->dev, PTR_ERR(dwmac->clk_tx), in starfive_dwmac_probe()
155 dwmac->dev = &pdev->dev; in starfive_dwmac_probe()
156 plat_dat->bsp_priv = dwmac; in starfive_dwmac_probe()