* [PATCH] net: dsa: mv88e6xxx: Remove legacy probe support
@ 2019-04-27 17:19 Andrew Lunn
2019-04-27 17:29 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Andrew Lunn @ 2019-04-27 17:19 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Florian Fainelli, Vivien Didelot, Andrew Lunn
Remove the legacy method of probing the mv88e6xxx driver, now that all
the mainline boards have been converted to use mdio based probing for
a number of cycles.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/dsa/mv88e6xxx/chip.c | 71 +-------------------------------
1 file changed, 1 insertion(+), 70 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index bfd5a7faef3b..489a899c80b6 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -4656,56 +4656,6 @@ static enum dsa_tag_protocol mv88e6xxx_get_tag_protocol(struct dsa_switch *ds,
return chip->info->tag_protocol;
}
-#if IS_ENABLED(CONFIG_NET_DSA_LEGACY)
-static const char *mv88e6xxx_drv_probe(struct device *dsa_dev,
- struct device *host_dev, int sw_addr,
- void **priv)
-{
- struct mv88e6xxx_chip *chip;
- struct mii_bus *bus;
- int err;
-
- bus = dsa_host_dev_to_mii_bus(host_dev);
- if (!bus)
- return NULL;
-
- chip = mv88e6xxx_alloc_chip(dsa_dev);
- if (!chip)
- return NULL;
-
- /* Legacy SMI probing will only support chips similar to 88E6085 */
- chip->info = &mv88e6xxx_table[MV88E6085];
-
- err = mv88e6xxx_smi_init(chip, bus, sw_addr);
- if (err)
- goto free;
-
- err = mv88e6xxx_detect(chip);
- if (err)
- goto free;
-
- mutex_lock(&chip->reg_lock);
- err = mv88e6xxx_switch_reset(chip);
- mutex_unlock(&chip->reg_lock);
- if (err)
- goto free;
-
- mv88e6xxx_phy_init(chip);
-
- err = mv88e6xxx_mdios_register(chip, NULL);
- if (err)
- goto free;
-
- *priv = chip;
-
- return chip->info->name;
-free:
- devm_kfree(dsa_dev, chip);
-
- return NULL;
-}
-#endif
-
static int mv88e6xxx_port_mdb_prepare(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_mdb *mdb)
{
@@ -4760,9 +4710,6 @@ static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port,
}
static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
-#if IS_ENABLED(CONFIG_NET_DSA_LEGACY)
- .probe = mv88e6xxx_drv_probe,
-#endif
.get_tag_protocol = mv88e6xxx_get_tag_protocol,
.setup = mv88e6xxx_setup,
.adjust_link = mv88e6xxx_adjust_link,
@@ -4808,10 +4755,6 @@ static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
.get_ts_info = mv88e6xxx_get_ts_info,
};
-static struct dsa_switch_driver mv88e6xxx_switch_drv = {
- .ops = &mv88e6xxx_switch_ops,
-};
-
static int mv88e6xxx_register_switch(struct mv88e6xxx_chip *chip)
{
struct device *dev = chip->dev;
@@ -5053,19 +4996,7 @@ static struct mdio_driver mv88e6xxx_driver = {
},
};
-static int __init mv88e6xxx_init(void)
-{
- register_switch_driver(&mv88e6xxx_switch_drv);
- return mdio_driver_register(&mv88e6xxx_driver);
-}
-module_init(mv88e6xxx_init);
-
-static void __exit mv88e6xxx_cleanup(void)
-{
- mdio_driver_unregister(&mv88e6xxx_driver);
- unregister_switch_driver(&mv88e6xxx_switch_drv);
-}
-module_exit(mv88e6xxx_cleanup);
+mdio_module_driver(mv88e6xxx_driver);
MODULE_AUTHOR("Lennert Buytenhek <buytenh@wantstofly.org>");
MODULE_DESCRIPTION("Driver for Marvell 88E6XXX ethernet switch chips");
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] net: dsa: mv88e6xxx: Remove legacy probe support
2019-04-27 17:19 [PATCH] net: dsa: mv88e6xxx: Remove legacy probe support Andrew Lunn
@ 2019-04-27 17:29 ` Andrew Lunn
2019-04-27 19:19 ` Florian Fainelli
2019-04-28 2:13 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2019-04-27 17:29 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Florian Fainelli, Vivien Didelot
On Sat, Apr 27, 2019 at 07:19:10PM +0200, Andrew Lunn wrote:
> Remove the legacy method of probing the mv88e6xxx driver, now that all
> the mainline boards have been converted to use mdio based probing for
> a number of cycles.
Upps. Forgot to put net-next into the subject line.
Sorry,
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: dsa: mv88e6xxx: Remove legacy probe support
2019-04-27 17:19 [PATCH] net: dsa: mv88e6xxx: Remove legacy probe support Andrew Lunn
2019-04-27 17:29 ` Andrew Lunn
@ 2019-04-27 19:19 ` Florian Fainelli
2019-04-28 2:13 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2019-04-27 19:19 UTC (permalink / raw)
To: Andrew Lunn, David Miller; +Cc: netdev, Vivien Didelot
On 4/27/2019 10:19 AM, Andrew Lunn wrote:
> Remove the legacy method of probing the mv88e6xxx driver, now that all
> the mainline boards have been converted to use mdio based probing for
> a number of cycles.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: dsa: mv88e6xxx: Remove legacy probe support
2019-04-27 17:19 [PATCH] net: dsa: mv88e6xxx: Remove legacy probe support Andrew Lunn
2019-04-27 17:29 ` Andrew Lunn
2019-04-27 19:19 ` Florian Fainelli
@ 2019-04-28 2:13 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2019-04-28 2:13 UTC (permalink / raw)
To: andrew; +Cc: netdev, f.fainelli, vivien.didelot
From: Andrew Lunn <andrew@lunn.ch>
Date: Sat, 27 Apr 2019 19:19:10 +0200
> Remove the legacy method of probing the mv88e6xxx driver, now that all
> the mainline boards have been converted to use mdio based probing for
> a number of cycles.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Applied... to net-next :-)
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-28 2:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-27 17:19 [PATCH] net: dsa: mv88e6xxx: Remove legacy probe support Andrew Lunn
2019-04-27 17:29 ` Andrew Lunn
2019-04-27 19:19 ` Florian Fainelli
2019-04-28 2:13 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).