Lines Matching refs:dwmac
59 struct oxnas_dwmac *dwmac = priv; in oxnas_dwmac_init() local
64 ret = device_reset(dwmac->dev); in oxnas_dwmac_init()
68 ret = clk_prepare_enable(dwmac->clk); in oxnas_dwmac_init()
72 ret = regmap_read(dwmac->regmap, OXNAS_DWMAC_CTRL_REGOFFSET, &value); in oxnas_dwmac_init()
74 clk_disable_unprepare(dwmac->clk); in oxnas_dwmac_init()
91 regmap_write(dwmac->regmap, OXNAS_DWMAC_CTRL_REGOFFSET, value); in oxnas_dwmac_init()
98 regmap_write(dwmac->regmap, OXNAS_DWMAC_DELAY_REGOFFSET, value); in oxnas_dwmac_init()
105 struct oxnas_dwmac *dwmac = priv; in oxnas_dwmac_exit() local
107 clk_disable_unprepare(dwmac->clk); in oxnas_dwmac_exit()
114 struct oxnas_dwmac *dwmac; in oxnas_dwmac_probe() local
125 dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL); in oxnas_dwmac_probe()
126 if (!dwmac) { in oxnas_dwmac_probe()
131 dwmac->dev = &pdev->dev; in oxnas_dwmac_probe()
132 plat_dat->bsp_priv = dwmac; in oxnas_dwmac_probe()
136 dwmac->regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, in oxnas_dwmac_probe()
138 if (IS_ERR(dwmac->regmap)) { in oxnas_dwmac_probe()
140 ret = PTR_ERR(dwmac->regmap); in oxnas_dwmac_probe()
144 dwmac->clk = devm_clk_get(&pdev->dev, "gmac"); in oxnas_dwmac_probe()
145 if (IS_ERR(dwmac->clk)) { in oxnas_dwmac_probe()
146 ret = PTR_ERR(dwmac->clk); in oxnas_dwmac_probe()