Lines Matching +full:force +full:- +full:internal +full:- +full:phy

1 // SPDX-License-Identifier: GPL-2.0+
3 * net/dsa/mv88e6060.c - Driver for Marvell 88e6060 switch chips
4 * Copyright (c) 2008-2009 Marvell Semiconductor
13 #include <linux/phy.h>
19 return mdiobus_read_nested(priv->bus, priv->sw_addr + addr, reg); in reg_read()
24 return mdiobus_write_nested(priv->bus, priv->sw_addr + addr, reg, val); in reg_write()
92 return -ETIMEDOUT; in mv88e6060_switch_reset()
121 if (dsa_is_unused_port(priv->ds, p)) in mv88e6060_setup_port()
124 /* Do not force flow control, disable Ingress and Egress in mv88e6060_setup_port()
130 dsa_is_cpu_port(priv->ds, p) ? in mv88e6060_setup_port()
145 (dsa_is_cpu_port(priv->ds, p) ? in mv88e6060_setup_port()
146 dsa_user_ports(priv->ds) : in mv88e6060_setup_port()
147 BIT(dsa_to_port(priv->ds, p)->cpu_dp->index))); in mv88e6060_setup_port()
189 struct mv88e6060_priv *priv = ds->priv; in mv88e6060_setup()
193 priv->ds = ds; in mv88e6060_setup()
222 return -1; in mv88e6060_port_to_phy_addr()
227 struct mv88e6060_priv *priv = ds->priv; in mv88e6060_phy_read()
231 if (addr == -1) in mv88e6060_phy_read()
240 struct mv88e6060_priv *priv = ds->priv; in mv88e6060_phy_write()
244 if (addr == -1) in mv88e6060_phy_write()
253 unsigned long *interfaces = config->supported_interfaces; in mv88e6060_phylink_get_caps()
254 struct mv88e6060_priv *priv = ds->priv; in mv88e6060_phylink_get_caps()
260 dev_err(ds->dev, in mv88e6060_phylink_get_caps()
266 /* If the port is configured in SNI mode (acts as a 10Mbps PHY), in mv88e6060_phylink_get_caps()
267 * it should have phy-mode = "sni", but that doesn't yet exist, so in mv88e6060_phylink_get_caps()
271 dev_warn(ds->dev, "port %d: SNI mode not supported\n", port); in mv88e6060_phylink_get_caps()
275 config->mac_capabilities = MAC_100 | MAC_10 | MAC_SYM_PAUSE; in mv88e6060_phylink_get_caps()
284 /* Ports 0 to 3 have internal PHYs, and port 4 can optionally in mv88e6060_phylink_get_caps()
285 * use an internal PHY. in mv88e6060_phylink_get_caps()
287 /* Internal PHY */ in mv88e6060_phylink_get_caps()
304 struct device *dev = &mdiodev->dev; in mv88e6060_probe()
311 return -ENOMEM; in mv88e6060_probe()
313 priv->bus = mdiodev->bus; in mv88e6060_probe()
314 priv->sw_addr = mdiodev->addr; in mv88e6060_probe()
316 name = mv88e6060_get_name(priv->bus, priv->sw_addr); in mv88e6060_probe()
318 return -ENODEV; in mv88e6060_probe()
324 return -ENOMEM; in mv88e6060_probe()
326 ds->dev = dev; in mv88e6060_probe()
327 ds->num_ports = MV88E6060_PORTS; in mv88e6060_probe()
328 ds->priv = priv; in mv88e6060_probe()
329 ds->dev = dev; in mv88e6060_probe()
330 ds->ops = &mv88e6060_switch_ops; in mv88e6060_probe()
339 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mv88e6060_remove()
349 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mv88e6060_shutdown()
356 dev_set_drvdata(&mdiodev->dev, NULL); in mv88e6060_shutdown()