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()
82 struct intel_dwmac *dwmac; in intel_eth_plat_probe() local
97 dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL); in intel_eth_plat_probe()
98 if (!dwmac) { in intel_eth_plat_probe()
103 dwmac->dev = &pdev->dev; in intel_eth_plat_probe()
104 dwmac->tx_clk = NULL; in intel_eth_plat_probe()
108 dwmac->data = (const struct intel_dwmac_data *)match->data; in intel_eth_plat_probe()
110 if (dwmac->data->fix_mac_speed) in intel_eth_plat_probe()
111 plat_dat->fix_mac_speed = dwmac->data->fix_mac_speed; in intel_eth_plat_probe()
114 if (dwmac->data->tx_clk_en) { in intel_eth_plat_probe()
115 dwmac->tx_clk = devm_clk_get(&pdev->dev, "tx_clk"); in intel_eth_plat_probe()
116 if (IS_ERR(dwmac->tx_clk)) { in intel_eth_plat_probe()
117 ret = PTR_ERR(dwmac->tx_clk); in intel_eth_plat_probe()
121 clk_prepare_enable(dwmac->tx_clk); in intel_eth_plat_probe()
124 rate = clk_get_rate(dwmac->tx_clk); in intel_eth_plat_probe()
125 if (dwmac->data->tx_clk_rate && in intel_eth_plat_probe()
126 rate != dwmac->data->tx_clk_rate) { in intel_eth_plat_probe()
127 rate = dwmac->data->tx_clk_rate; in intel_eth_plat_probe()
128 ret = clk_set_rate(dwmac->tx_clk, rate); in intel_eth_plat_probe()
139 if (dwmac->data->ptp_ref_clk_rate && in intel_eth_plat_probe()
140 rate != dwmac->data->ptp_ref_clk_rate) { in intel_eth_plat_probe()
141 rate = dwmac->data->ptp_ref_clk_rate; in intel_eth_plat_probe()
151 plat_dat->bsp_priv = dwmac; in intel_eth_plat_probe()
163 clk_disable_unprepare(dwmac->tx_clk); in intel_eth_plat_probe()
177 struct intel_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev); in intel_eth_plat_remove() local
181 clk_disable_unprepare(dwmac->tx_clk); in intel_eth_plat_remove()