mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00

Uses upstream DSA switch modules (rtl8365mb, rtl8366), similar to RTL8367C and rtl8366rb swconfig drivers. The package dependencies exclude targets built without kernel CONFIG_OF. It also fixes the rtl8366rb LED support. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Signed-off-by: Robert Marko <robimarko@gmail.com>
94 lines
3.4 KiB
Diff
94 lines
3.4 KiB
Diff
From 98b75c1c149c653ad11a440636213eb070325158 Mon Sep 17 00:00:00 2001
|
|
From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
|
Date: Fri, 9 Feb 2024 02:03:42 -0300
|
|
Subject: net: dsa: realtek: merge rtl83xx and interface
|
|
modules into realtek_dsa
|
|
|
|
Since rtl83xx and realtek-{smi,mdio} are always loaded together,
|
|
we can optimize resource usage by consolidating them into a single
|
|
module.
|
|
|
|
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
|
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
|
|
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
|
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
drivers/net/dsa/realtek/Kconfig | 4 ++--
|
|
drivers/net/dsa/realtek/Makefile | 11 +++++++++--
|
|
drivers/net/dsa/realtek/realtek-mdio.c | 5 -----
|
|
drivers/net/dsa/realtek/realtek-smi.c | 5 -----
|
|
drivers/net/dsa/realtek/rtl83xx.c | 1 +
|
|
5 files changed, 12 insertions(+), 14 deletions(-)
|
|
|
|
--- a/drivers/net/dsa/realtek/Kconfig
|
|
+++ b/drivers/net/dsa/realtek/Kconfig
|
|
@@ -16,14 +16,14 @@ menuconfig NET_DSA_REALTEK
|
|
if NET_DSA_REALTEK
|
|
|
|
config NET_DSA_REALTEK_MDIO
|
|
- tristate "Realtek MDIO interface support"
|
|
+ bool "Realtek MDIO interface support"
|
|
depends on OF
|
|
help
|
|
Select to enable support for registering switches configured
|
|
through MDIO.
|
|
|
|
config NET_DSA_REALTEK_SMI
|
|
- tristate "Realtek SMI interface support"
|
|
+ bool "Realtek SMI interface support"
|
|
depends on OF
|
|
help
|
|
Select to enable support for registering switches connected
|
|
--- a/drivers/net/dsa/realtek/Makefile
|
|
+++ b/drivers/net/dsa/realtek/Makefile
|
|
@@ -1,8 +1,15 @@
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
obj-$(CONFIG_NET_DSA_REALTEK) += realtek_dsa.o
|
|
realtek_dsa-objs := rtl83xx.o
|
|
-obj-$(CONFIG_NET_DSA_REALTEK_MDIO) += realtek-mdio.o
|
|
-obj-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek-smi.o
|
|
+
|
|
+ifdef CONFIG_NET_DSA_REALTEK_MDIO
|
|
+realtek_dsa-objs += realtek-mdio.o
|
|
+endif
|
|
+
|
|
+ifdef CONFIG_NET_DSA_REALTEK_SMI
|
|
+realtek_dsa-objs += realtek-smi.o
|
|
+endif
|
|
+
|
|
obj-$(CONFIG_NET_DSA_REALTEK_RTL8366RB) += rtl8366.o
|
|
rtl8366-objs := rtl8366-core.o rtl8366rb.o
|
|
obj-$(CONFIG_NET_DSA_REALTEK_RTL8365MB) += rtl8365mb.o
|
|
--- a/drivers/net/dsa/realtek/realtek-mdio.c
|
|
+++ b/drivers/net/dsa/realtek/realtek-mdio.c
|
|
@@ -186,8 +186,3 @@ void realtek_mdio_shutdown(struct mdio_d
|
|
rtl83xx_shutdown(priv);
|
|
}
|
|
EXPORT_SYMBOL_NS_GPL(realtek_mdio_shutdown, REALTEK_DSA);
|
|
-
|
|
-MODULE_AUTHOR("Luiz Angelo Daros de Luca <luizluca@gmail.com>");
|
|
-MODULE_DESCRIPTION("Driver for Realtek ethernet switch connected via MDIO interface");
|
|
-MODULE_LICENSE("GPL");
|
|
-MODULE_IMPORT_NS(REALTEK_DSA);
|
|
--- a/drivers/net/dsa/realtek/realtek-smi.c
|
|
+++ b/drivers/net/dsa/realtek/realtek-smi.c
|
|
@@ -470,8 +470,3 @@ void realtek_smi_shutdown(struct platfor
|
|
rtl83xx_shutdown(priv);
|
|
}
|
|
EXPORT_SYMBOL_NS_GPL(realtek_smi_shutdown, REALTEK_DSA);
|
|
-
|
|
-MODULE_AUTHOR("Linus Walleij <linus.walleij@linaro.org>");
|
|
-MODULE_DESCRIPTION("Driver for Realtek ethernet switch connected via SMI interface");
|
|
-MODULE_LICENSE("GPL");
|
|
-MODULE_IMPORT_NS(REALTEK_DSA);
|
|
--- a/drivers/net/dsa/realtek/rtl83xx.c
|
|
+++ b/drivers/net/dsa/realtek/rtl83xx.c
|
|
@@ -232,5 +232,6 @@ void rtl83xx_remove(struct realtek_priv
|
|
EXPORT_SYMBOL_NS_GPL(rtl83xx_remove, REALTEK_DSA);
|
|
|
|
MODULE_AUTHOR("Luiz Angelo Daros de Luca <luizluca@gmail.com>");
|
|
+MODULE_AUTHOR("Linus Walleij <linus.walleij@linaro.org>");
|
|
MODULE_DESCRIPTION("Realtek DSA switches common module");
|
|
MODULE_LICENSE("GPL");
|