summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/ocelot/felix.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-09-18 17:53:05 -0700
committerDavid S. Miller <davem@davemloft.net>2020-09-18 17:53:05 -0700
commit0db0561d13df07978bea63a19f644fc16a60f54a (patch)
tree5666cdb4f4dcf0eb35282967470e2d9f6eaf1fc4 /drivers/net/dsa/ocelot/felix.c
parent42ccf1cd6aa5bb6fba7a2bfeb08c88d822e05916 (diff)
parentd60bc62de4ae068ed4b215c24cdfdd5035aa986e (diff)
Merge branch 'Felix-DSA-driver-cleanup-build-Seville-separately'
Vladimir Oltean says: ==================== Felix DSA driver cleanup: build Seville separately When introducing the Seville switch support to the Felix driver, some technical debt was created. Since both VSC9959 and VSC9953 are embedded switches (one on an arm64 SoC and the other on a powerpc SoC), there is no use case for having the code for both be present in the same module. This was necessary at the time due to the common SERDES PCS code that they were using, but that has been since refactored into drivers/net/pcs/pcs-lynx.c. This makes the Seville driver stop uselessly depending upon PCI and FSL_ENETC_MDIO, which were only dependencies of Felix in fact. Some whitespace/tab conversions are also present in this series as part of the cleanup process. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/ocelot/felix.c')
-rw-r--r--drivers/net/dsa/ocelot/felix.c47
1 files changed, 2 insertions, 45 deletions
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index a1e1d3824110..f9a7034be0c7 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -538,23 +538,6 @@ static int felix_init_structs(struct felix *felix, int num_phys_ports)
return 0;
}
-static struct ptp_clock_info ocelot_ptp_clock_info = {
- .owner = THIS_MODULE,
- .name = "felix ptp",
- .max_adj = 0x7fffffff,
- .n_alarm = 0,
- .n_ext_ts = 0,
- .n_per_out = OCELOT_PTP_PINS_NUM,
- .n_pins = OCELOT_PTP_PINS_NUM,
- .pps = 0,
- .gettime64 = ocelot_ptp_gettime64,
- .settime64 = ocelot_ptp_settime64,
- .adjtime = ocelot_ptp_adjtime,
- .adjfine = ocelot_ptp_adjfine,
- .verify = ocelot_ptp_verify,
- .enable = ocelot_ptp_enable,
-};
-
/* Hardware initialization done here so that we can allocate structures with
* devm without fear of dsa_register_switch returning -EPROBE_DEFER and causing
* us to allocate structures twice (leak memory) and map PCI memory twice
@@ -573,7 +556,7 @@ static int felix_setup(struct dsa_switch *ds)
ocelot_init(ocelot);
if (ocelot->ptp) {
- err = ocelot_init_timestamp(ocelot, &ocelot_ptp_clock_info);
+ err = ocelot_init_timestamp(ocelot, felix->info->ptp_caps);
if (err) {
dev_err(ocelot->dev,
"Timestamp initialization failed\n");
@@ -797,31 +780,5 @@ const struct dsa_switch_ops felix_switch_ops = {
.cls_flower_add = felix_cls_flower_add,
.cls_flower_del = felix_cls_flower_del,
.cls_flower_stats = felix_cls_flower_stats,
- .port_setup_tc = felix_port_setup_tc,
+ .port_setup_tc = felix_port_setup_tc,
};
-
-static int __init felix_init(void)
-{
- int err;
-
- err = pci_register_driver(&felix_vsc9959_pci_driver);
- if (err)
- return err;
-
- err = platform_driver_register(&seville_vsc9953_driver);
- if (err)
- return err;
-
- return 0;
-}
-module_init(felix_init);
-
-static void __exit felix_exit(void)
-{
- pci_unregister_driver(&felix_vsc9959_pci_driver);
- platform_driver_unregister(&seville_vsc9953_driver);
-}
-module_exit(felix_exit);
-
-MODULE_DESCRIPTION("Felix Switch driver");
-MODULE_LICENSE("GPL v2");