Lines Matching refs:dwmac
33 struct intel_dwmac *dwmac = priv; in kmb_eth_fix_mac_speed() local
37 rate = clk_get_rate(dwmac->tx_clk); in kmb_eth_fix_mac_speed()
53 dev_err(dwmac->dev, "Invalid speed\n"); in kmb_eth_fix_mac_speed()
57 ret = clk_set_rate(dwmac->tx_clk, rate); in kmb_eth_fix_mac_speed()
59 dev_err(dwmac->dev, "Failed to configure tx clock rate\n"); in kmb_eth_fix_mac_speed()
80 struct intel_dwmac *dwmac; in intel_eth_plat_probe() local
94 dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL); in intel_eth_plat_probe()
95 if (!dwmac) { in intel_eth_plat_probe()
100 dwmac->dev = &pdev->dev; in intel_eth_plat_probe()
101 dwmac->tx_clk = NULL; in intel_eth_plat_probe()
105 dwmac->data = (const struct intel_dwmac_data *)match->data; in intel_eth_plat_probe()
107 if (dwmac->data->fix_mac_speed) in intel_eth_plat_probe()
108 plat_dat->fix_mac_speed = dwmac->data->fix_mac_speed; in intel_eth_plat_probe()
111 if (dwmac->data->tx_clk_en) { in intel_eth_plat_probe()
112 dwmac->tx_clk = devm_clk_get(&pdev->dev, "tx_clk"); in intel_eth_plat_probe()
113 if (IS_ERR(dwmac->tx_clk)) { in intel_eth_plat_probe()
114 ret = PTR_ERR(dwmac->tx_clk); in intel_eth_plat_probe()
118 clk_prepare_enable(dwmac->tx_clk); in intel_eth_plat_probe()
121 rate = clk_get_rate(dwmac->tx_clk); in intel_eth_plat_probe()
122 if (dwmac->data->tx_clk_rate && in intel_eth_plat_probe()
123 rate != dwmac->data->tx_clk_rate) { in intel_eth_plat_probe()
124 rate = dwmac->data->tx_clk_rate; in intel_eth_plat_probe()
125 ret = clk_set_rate(dwmac->tx_clk, rate); in intel_eth_plat_probe()
136 if (dwmac->data->ptp_ref_clk_rate && in intel_eth_plat_probe()
137 rate != dwmac->data->ptp_ref_clk_rate) { in intel_eth_plat_probe()
138 rate = dwmac->data->ptp_ref_clk_rate; in intel_eth_plat_probe()
148 plat_dat->bsp_priv = dwmac; in intel_eth_plat_probe()
160 clk_disable_unprepare(dwmac->tx_clk); in intel_eth_plat_probe()
174 struct intel_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev); in intel_eth_plat_remove() local
177 clk_disable_unprepare(dwmac->tx_clk); in intel_eth_plat_remove()