Lines Matching refs:mac_dev

42 static void mac_exception(struct mac_device *mac_dev,  in mac_exception()  argument
47 mac_dev->set_exception(mac_dev->fman_mac, in mac_exception()
49 dev_err(mac_dev->dev, "10G MAC got RX FIFO Error = %x\n", ex); in mac_exception()
52 dev_dbg(mac_dev->dev, "%s:%s() -> %d\n", KBUILD_BASENAME ".c", in mac_exception()
59 struct mac_device *mac_dev) in dpaa_eth_add_device() argument
67 priv = mac_dev->priv; in dpaa_eth_add_device()
69 data.mac_dev = mac_dev; in dpaa_eth_add_device()
80 pdev->dev.parent = mac_dev->dev; in dpaa_eth_add_device()
114 int (*init)(struct mac_device *mac_dev, struct device_node *mac_node, in mac_probe()
118 struct mac_device *mac_dev; in mac_probe() local
130 mac_dev = devm_kzalloc(dev, sizeof(*mac_dev), GFP_KERNEL); in mac_probe()
131 if (!mac_dev) in mac_probe()
136 platform_set_drvdata(_of_dev, mac_dev); in mac_probe()
139 mac_dev->priv = priv; in mac_probe()
140 mac_dev->dev = dev; in mac_probe()
156 mac_dev->fman_dev = &of_dev->dev; in mac_probe()
168 priv->fman = fman_bind(mac_dev->fman_dev); in mac_probe()
179 put_device(mac_dev->fman_dev); in mac_probe()
184 mac_dev->res = platform_get_mem_or_io(_of_dev, 0); in mac_probe()
185 if (!mac_dev->res) { in mac_probe()
192 mac_dev->res); in mac_probe()
198 mac_dev->vaddr = devm_ioremap(dev, mac_dev->res->start, in mac_probe()
199 resource_size(mac_dev->res)); in mac_probe()
200 if (!mac_dev->vaddr) { in mac_probe()
226 err = of_get_mac_address(mac_node, mac_dev->addr); in mac_probe()
239 if (nph != ARRAY_SIZE(mac_dev->port)) { in mac_probe()
264 mac_dev->fman_port_devs[i] = &of_dev->dev; in mac_probe()
266 mac_dev->port[i] = fman_port_bind(mac_dev->fman_port_devs[i]); in mac_probe()
267 if (!mac_dev->port[i]) { in mac_probe()
277 put_device(mac_dev->fman_port_devs[i]); in mac_probe()
290 mac_dev->phy_if = phy_if; in mac_probe()
297 err = init(mac_dev, mac_node, &params); in mac_probe()
301 if (!is_zero_ether_addr(mac_dev->addr)) in mac_probe()
302 dev_info(dev, "FMan MAC address: %pM\n", mac_dev->addr); in mac_probe()
304 priv->eth_dev = dpaa_eth_add_device(fman_id, mac_dev); in mac_probe()
317 put_device(mac_dev->fman_port_devs[i]); in mac_probe()
319 put_device(mac_dev->fman_dev); in mac_probe()
327 struct mac_device *mac_dev = platform_get_drvdata(pdev); in mac_remove() local
331 put_device(mac_dev->fman_port_devs[i]); in mac_remove()
332 put_device(mac_dev->fman_dev); in mac_remove()
334 platform_device_unregister(mac_dev->priv->eth_dev); in mac_remove()