realtek: align kernel config with upstream
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Fri, 15 Nov 2024 06:32:47 +0000 (01:32 -0500)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 16 Nov 2024 17:02:18 +0000 (18:02 +0100)
Since the start of the Realtek target OpenWrt works with RTL83XX as the
target architecture. Upstream is using MACH_REALTEK_RTL instead. To
simplify further development align that.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16963
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
15 files changed:
target/linux/realtek/files-6.6/arch/mips/rtl838x/Platform
target/linux/realtek/files-6.6/drivers/clk/realtek/Kconfig
target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/Kconfig
target/linux/realtek/patches-6.6/300-mips-add-rtl838x-platform.patch
target/linux/realtek/patches-6.6/301-gpio-add-rtl8231-driver.patch
target/linux/realtek/patches-6.6/303-gpio-update-dependencies-for-gpio-realtek-otto.patch [deleted file]
target/linux/realtek/patches-6.6/304-spi-update-dependency-for-spi-realtek-rtl.patch [deleted file]
target/linux/realtek/patches-6.6/305-irqchip-update-dependency-for-irq-realtek-rtl.patch [deleted file]
target/linux/realtek/patches-6.6/307-wdt-update-dependency-for-realtek-otto-wdt.patch [deleted file]
target/linux/realtek/patches-6.6/716-net-ethernet-add-support-for-rtl838x-ethernet.patch
target/linux/realtek/patches-6.6/720-add-rtl-phy.patch
target/linux/realtek/rtl838x/config-6.6
target/linux/realtek/rtl839x/config-6.6
target/linux/realtek/rtl930x/config-6.6
target/linux/realtek/rtl931x/config-6.6

index 98f18cac1be13ba97168c7a4d86574b53f250b5b..e824dee7b724d406744c6420250242fdb1498627 100644 (file)
@@ -1,5 +1,5 @@
 #
 # Realtek RTL838x SoCs
 #
-cflags-$(CONFIG_RTL83XX)   += -I$(srctree)/arch/mips/include/asm/mach-rtl838x/
-load-$(CONFIG_RTL83XX)     += 0xffffffff80100000
+cflags-$(CONFIG_MACH_REALTEK_RTL)   += -I$(srctree)/arch/mips/include/asm/mach-rtl838x/
+load-$(CONFIG_MACH_REALTEK_RTL)     += 0xffffffff80100000
index 4cf3cd963399a22ec640794bfa039f3fc561a080..62b704077ac75f38426360a654bb2b6eef151470 100644 (file)
@@ -2,13 +2,13 @@
 
 menuconfig COMMON_CLK_REALTEK
        bool "Support for Realtek's clock controllers"
-       depends on RTL83XX
+       depends on MACH_REALTEK_RTL
 
 if COMMON_CLK_REALTEK
 
 config COMMON_CLK_RTL83XX
        bool "Clock driver for Realtek RTL83XX"
-       depends on RTL83XX
+       depends on MACH_REALTEK_RTL
        select SRAM
        help
          This driver adds support for the Realtek RTL83xx series basic clocks.
index 3124ee8d20c219ab3375e09e3cd0cc77bf5c4489..0af4abcfb9cbd26f96df82196f54cf44f14415dd 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config NET_DSA_RTL83XX
        tristate "Realtek RTL838x/RTL839x switch support"
-       depends on RTL83XX
+       depends on MACH_REALTEK_RTL
        select NET_DSA_TAG_TRAILER
        help
          This driver adds support for Realtek RTL83xx series switching.
index 7adbbbc517431bd3df6bcc29531ecde173d62465..bb89a7864fe49a41b248f99107d0cb869ea08aa5 100644 (file)
@@ -9,64 +9,67 @@ configurations for the SoCs, which are introduced in addition.
 
 Submitted-by: Birger Koblitz <git@birger-koblitz.de>
 ---
- arch/mips/Kbuild.platforms                    |  1 +
- arch/mips/Kconfig                             | 57 ++++++++++++++
- 2 files changed, 58 insertions(+)
-
 --- a/arch/mips/Kbuild.platforms
 +++ b/arch/mips/Kbuild.platforms
 @@ -22,6 +22,7 @@ platform-$(CONFIG_MACH_NINTENDO64)   += n6
  platform-$(CONFIG_PIC32MZDA)          += pic32/
  platform-$(CONFIG_RALINK)             += ralink/
  platform-$(CONFIG_MIKROTIK_RB532)     += rb532/
-+platform-$(CONFIG_RTL83XX)            += rtl838x/
++platform-$(CONFIG_MACH_REALTEK_RTL)   += rtl838x/
  platform-$(CONFIG_SGI_IP22)           += sgi-ip22/
  platform-$(CONFIG_SGI_IP27)           += sgi-ip27/
  platform-$(CONFIG_SGI_IP28)           += sgi-ip22/
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -968,8 +968,58 @@ config CAVIUM_OCTEON_SOC
-               Hikari
-         Say Y here for most Octeon reference boards.
+@@ -620,21 +620,23 @@ config RALINK
  
-+config RTL83XX
-+      bool "Realtek based platforms"
-+      select DMA_NONCOHERENT
-+      select IRQ_MIPS_CPU
+ config MACH_REALTEK_RTL
+       bool "Realtek RTL838x/RTL839x based machines"
+-      select MIPS_GENERIC
+       select DMA_NONCOHERENT
+       select IRQ_MIPS_CPU
+-      select CSRC_R4K
+-      select CEVT_R4K
+       select SYS_HAS_CPU_MIPS32_R1
+       select SYS_HAS_CPU_MIPS32_R2
+       select SYS_SUPPORTS_BIG_ENDIAN
+       select SYS_SUPPORTS_32BIT_KERNEL
+       select SYS_SUPPORTS_MIPS16
+-      select SYS_SUPPORTS_MULTITHREADING
+-      select SYS_SUPPORTS_VPE_LOADER
+       select BOOT_RAW
+       select PINCTRL
+       select USE_OF
 +      select NO_EXCEPT_FILL
-+      select SYS_HAS_CPU_MIPS32_R1
-+      select SYS_HAS_CPU_MIPS32_R2
-+      select SYS_SUPPORTS_BIG_ENDIAN
 +      select SYS_SUPPORTS_HIGHMEM
-+      select SYS_SUPPORTS_32BIT_KERNEL
-+      select SYS_SUPPORTS_MIPS16
 +      select SYS_HAS_EARLY_PRINTK
 +      select SYS_HAS_EARLY_PRINTK_8250
 +      select USE_GENERIC_EARLY_PRINTK_8250
-+      select BOOT_RAW
-+      select PINCTRL
 +      select ARCH_HAS_RESET_CONTROLLER
 +      select RESET_CONTROLLER
-+      select USE_OF
-+
+ config SGI_IP22
+       bool "SGI IP22 (Indy/Indigo2)"
+@@ -970,6 +972,36 @@ config CAVIUM_OCTEON_SOC
  endchoice
  
 +config RTL838X
 +      bool "Realtek RTL838X based platforms"
-+      depends on RTL83XX
++      depends on MACH_REALTEK_RTL
 +      select CPU_SUPPORTS_CPUFREQ
 +      select MIPS_EXTERNAL_TIMER
 +
 +config RTL839X
 +      bool "Realtek RTL839X based platforms"
-+      depends on RTL83XX
++      depends on MACH_REALTEK_RTL
 +      select CPU_SUPPORTS_CPUFREQ
 +      select MIPS_EXTERNAL_TIMER
 +      select SYS_SUPPORTS_MULTITHREADING
 +
 +config RTL930X
 +      bool "Realtek RTL930X based platforms"
-+      depends on RTL83XX
++      depends on MACH_REALTEK_RTL
 +      select MIPS_CPU_SCACHE
 +      select MIPS_EXTERNAL_TIMER
 +      select SYS_SUPPORTS_MULTITHREADING
index a1778764206d121dd372ee9b6622484a51e35cb8..f64e2cf94eff8ca3440706870acaa9ab8bae5a31 100644 (file)
@@ -31,7 +31,7 @@ Submitted-by: John Crispin <john@phrozen.org>
  
 +config GPIO_RTL8231
 +      tristate "RTL8231 GPIO"
-+      depends on RTL83XX
++      depends on MACH_REALTEK_RTL
 +      help
 +        Say yes here to support Realtek RTL8231 GPIO expansion chips.
 +
diff --git a/target/linux/realtek/patches-6.6/303-gpio-update-dependencies-for-gpio-realtek-otto.patch b/target/linux/realtek/patches-6.6/303-gpio-update-dependencies-for-gpio-realtek-otto.patch
deleted file mode 100644 (file)
index 2b46634..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From 9bac1c20b8f39f2e0e342b087add5093b94feaed Mon Sep 17 00:00:00 2001
-From: INAGAKI Hiroshi <musashino.open@gmail.com>
-Date: Wed, 5 May 2021 22:05:39 +0900
-Subject: realtek: backport gpio-realtek-otto driver from 5.13 to 5.10
-
-This patch backports "gpio-realtek-otto" driver to Kernel 5.10.
-"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X"
-is used in OpenWrt, so update the dependency by the additional patch.
-
-Submitted-by: INAGAKI Hiroshi <musashino.open@gmail.com>
----
- drivers/gpio/Kconfig                          |   4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
---- a/drivers/gpio/Kconfig
-+++ b/drivers/gpio/Kconfig
-@@ -527,8 +527,8 @@ config GPIO_RDA
- config GPIO_REALTEK_OTTO
-       tristate "Realtek Otto GPIO support"
--      depends on MACH_REALTEK_RTL
--      default MACH_REALTEK_RTL
-+      depends on RTL83XX
-+      default RTL838X
-       select GPIO_GENERIC
-       select GPIOLIB_IRQCHIP
-       help
diff --git a/target/linux/realtek/patches-6.6/304-spi-update-dependency-for-spi-realtek-rtl.patch b/target/linux/realtek/patches-6.6/304-spi-update-dependency-for-spi-realtek-rtl.patch
deleted file mode 100644 (file)
index 0153025..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-From 0b000cbfe0aa0323bffa855ef8449c0687a4c071 Mon Sep 17 00:00:00 2001
-From: INAGAKI Hiroshi <musashino.open@gmail.com>
-Date: Thu, 6 May 2021 19:30:58 +0900
-Subject: realtek: backport spi-realtek-rtl driver from 5.12 to 5.10
-
-This patch backports "spi-realtek-rtl" driver to Kernel 5.10 from 5.12.
-"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X"
-is used in OpenWrt, so update the dependency by the additional patch.
-
-Submitted-by: INAGAKI Hiroshi <musashino.open@gmail.com>
----
- drivers/spi/Makefile                          |  2 +-
- 1 files changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/spi/Makefile
-+++ b/drivers/spi/Makefile
-@@ -114,7 +114,7 @@ obj-$(CONFIG_SPI_QUP)                      += spi-qup.o
- obj-$(CONFIG_SPI_ROCKCHIP)            += spi-rockchip.o
- obj-$(CONFIG_SPI_ROCKCHIP_SFC)                += spi-rockchip-sfc.o
- obj-$(CONFIG_SPI_RB4XX)                       += spi-rb4xx.o
--obj-$(CONFIG_MACH_REALTEK_RTL)                += spi-realtek-rtl.o
-+obj-$(CONFIG_RTL83XX)                 += spi-realtek-rtl.o
- obj-$(CONFIG_SPI_RPCIF)                       += spi-rpc-if.o
- obj-$(CONFIG_SPI_RSPI)                        += spi-rspi.o
- obj-$(CONFIG_SPI_RZV2M_CSI)           += spi-rzv2m-csi.o
diff --git a/target/linux/realtek/patches-6.6/305-irqchip-update-dependency-for-irq-realtek-rtl.patch b/target/linux/realtek/patches-6.6/305-irqchip-update-dependency-for-irq-realtek-rtl.patch
deleted file mode 100644 (file)
index 0ecc333..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-From 2cd00b51470a30198b048a5fca48a04db77e29cc Mon Sep 17 00:00:00 2001
-From: INAGAKI Hiroshi <musashino.open@gmail.com>
-Date: Fri, 21 May 2021 23:16:37 +0900
-Subject: [PATCH] realtek: backport irq-realtek-rtl driver from 5.12 to 5.10
-
-This patch backports "irq-realtek-rtl" driver to Kernel 5.10 from 5.12.
-"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X"
-is used in OpenWrt, so update the dependency by the additional patch.
-
-Submitted-by: INAGAKI Hiroshi <musashino.open@gmail.com>
----
- drivers/irqchip/Makefile                      | 2 +-
- 1 files changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/irqchip/Makefile
-+++ b/drivers/irqchip/Makefile
-@@ -114,7 +114,7 @@ obj-$(CONFIG_LOONGSON_PCH_MSI)             += irq-l
- obj-$(CONFIG_LOONGSON_PCH_LPC)                += irq-loongson-pch-lpc.o
- obj-$(CONFIG_MST_IRQ)                 += irq-mst-intc.o
- obj-$(CONFIG_SL28CPLD_INTC)           += irq-sl28cpld.o
--obj-$(CONFIG_MACH_REALTEK_RTL)                += irq-realtek-rtl.o
-+obj-$(CONFIG_RTL83XX)                 += irq-realtek-rtl.o
- obj-$(CONFIG_WPCM450_AIC)             += irq-wpcm450-aic.o
- obj-$(CONFIG_IRQ_IDT3243X)            += irq-idt3243x.o
- obj-$(CONFIG_APPLE_AIC)                       += irq-apple-aic.o
diff --git a/target/linux/realtek/patches-6.6/307-wdt-update-dependency-for-realtek-otto-wdt.patch b/target/linux/realtek/patches-6.6/307-wdt-update-dependency-for-realtek-otto-wdt.patch
deleted file mode 100644 (file)
index c9dab65..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-From b8fc5eecdc5d33cf261986436597b5482ab856da Mon Sep 17 00:00:00 2001
-From: Sander Vanheule <sander@svanheule.net>
-Date: Sun, 14 Nov 2021 19:45:32 +0100
-Subject: [PATCH] realtek: Backport Realtek Otto WDT driver
-
-Add patch submitted upstream to linux-watchdog and replace the MIPS
-architecture symbols. Requires one extra patch for the DIV_ROUND_*
-macros, which have moved to a different header since 5.10.
-
-Submitted-by: Sander Vanheule <sander@svanheule.net>
-Tested-by: Stijn Segers <foss@volatilesystems.org>
-Tested-by: Paul Fertser <fercerpav@gmail.com>
-Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
----
- drivers/watchdog/Kconfig                      | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/watchdog/Kconfig
-+++ b/drivers/watchdog/Kconfig
-@@ -977,10 +977,10 @@ config RTD119X_WATCHDOG
- config REALTEK_OTTO_WDT
-       tristate "Realtek Otto MIPS watchdog support"
--      depends on MACH_REALTEK_RTL || COMPILE_TEST
-+      depends on RTL83XX
-       depends on COMMON_CLK
-       select WATCHDOG_CORE
--      default MACH_REALTEK_RTL
-+      default RTL83XX
-       help
-         Say Y here to include support for the watchdog timer on Realtek
-         RTL838x, RTL839x, RTL930x SoCs. This watchdog has pretimeout
index 9d79ea565d2ccb6b15625b4edb08259a842b2150..e0c10bca633fada50b73f42dfd01adec124e001d 100644 (file)
@@ -29,7 +29,7 @@ Submitted-by: John Crispin <john@phrozen.org>
 +
 +config NET_RTL838X
 +      tristate "Realtek rtl838x Ethernet MAC support"
-+      depends on RTL83XX
++      depends on MACH_REALTEK_RTL
 +      help
 +        Say Y here if you want to use the Realtek rtl838x Gbps Ethernet MAC.
 +
index 78a57f0a3e9810ecf33fce9f5857a0ee2d1cc3c9..43d4a7d4fccf514c3a94d6457c2f8b85c7a5950a 100644 (file)
@@ -20,7 +20,7 @@ Submitted-by: Birger Koblitz <mail@birger-koblitz.de>
  
 +config REALTEK_SOC_PHY
 +      tristate "Realtek SoC PHYs"
-+      depends on RTL83XX
++      depends on MACH_REALTEK_RTL
 +      help
 +        Supports the PHYs found in combination with Realtek Switch SoCs
 +
index ad2c1b43cce8d7de67c3e39f2a61b899ba25e486..44c1d7e0645c9d15db313faa1fa3f59df71f1bd8 100644 (file)
@@ -116,6 +116,7 @@ CONFIG_JFFS2_ZLIB=y
 CONFIG_LEDS_GPIO=y
 CONFIG_LIBFDT=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MACH_REALTEK_RTL=y
 CONFIG_MARVELL_PHY=y
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
@@ -192,7 +193,6 @@ CONFIG_REGMAP_MMIO=y
 CONFIG_RESET_CONTROLLER=y
 CONFIG_RTL838X=y
 # CONFIG_RTL839X is not set
-CONFIG_RTL83XX=y
 # CONFIG_RTL930X is not set
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
index a357eb396660150820dfe18cf391848685f68522..630027bf8133bbd957a8d1efbce24df69b954b19 100644 (file)
@@ -115,6 +115,7 @@ CONFIG_JFFS2_ZLIB=y
 CONFIG_LEDS_GPIO=y
 CONFIG_LIBFDT=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MACH_REALTEK_RTL=y
 CONFIG_MARVELL_PHY=y
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
@@ -204,7 +205,6 @@ CONFIG_RFS_ACCEL=y
 CONFIG_RPS=y
 # CONFIG_RTL838X is not set
 CONFIG_RTL839X=y
-CONFIG_RTL83XX=y
 # CONFIG_RTL930X is not set
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
index af5f2ca7a313b42db2482d9de0b763bff4317316..5a29bdc3c1ba78944399cfc2a691172209e436c2 100644 (file)
@@ -97,6 +97,7 @@ CONFIG_JFFS2_ZLIB=y
 CONFIG_LEDS_GPIO=y
 CONFIG_LIBFDT=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MACH_REALTEK_RTL=y
 CONFIG_MARVELL_PHY=y
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
@@ -172,7 +173,6 @@ CONFIG_REGMAP_MMIO=y
 CONFIG_RESET_CONTROLLER=y
 # CONFIG_RTL838X is not set
 # CONFIG_RTL839X is not set
-CONFIG_RTL83XX=y
 CONFIG_RTL930X=y
 # CONFIG_RTL931X is not set
 CONFIG_SERIAL_MCTRL_GPIO=y
index 736f4720296d8c0762dc1aab335ca48b585108cc..df235defe83c84706f21032ecab551d84d97dd55 100644 (file)
@@ -106,6 +106,7 @@ CONFIG_KMAP_LOCAL=y
 CONFIG_LEDS_GPIO=y
 CONFIG_LIBFDT=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MACH_REALTEK_RTL=y
 CONFIG_MARVELL_PHY=y
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
@@ -195,7 +196,6 @@ CONFIG_RFS_ACCEL=y
 CONFIG_RPS=y
 # CONFIG_RTL838X is not set
 # CONFIG_RTL839X is not set
-CONFIG_RTL83XX=y
 CONFIG_RTL930X=y
 CONFIG_RTL931X=y
 CONFIG_SENSORS_GPIO_FAN=y