realtek: timer: Activate for RTL930x devices
authorOlliver Schinagl <oliver@schinagl.nl>
Wed, 14 Sep 2022 12:50:38 +0000 (14:50 +0200)
committerSander Vanheule <sander@svanheule.net>
Sat, 28 Jan 2023 16:30:26 +0000 (17:30 +0100)
Use the new timer driver for the RTL930x devices.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
[remove old clock provider, select MIPS_EXTERNAL_TIMER and refresh
kernel config]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
target/linux/realtek/dts-5.15/rtl930x.dtsi
target/linux/realtek/patches-5.15/300-mips-add-rtl838x-platform.patch
target/linux/realtek/rtl930x/config-5.15

index c2a992a174c77ccc542b51c28d3b1dc8ffa72f40..fdec626c9a803d1d98f24afbb96675162cd02628 100644 (file)
                        interrupts = <2>, <3>, <4>, <5>, <6>, <7>;
                };
 
-               rtl9300clock: rtl9300clock@3200 {
-                       compatible = "realtek,rtl9300clock";
-                       reg = <0x3200 0x10>, <0x3210 0x10>;
-
-                       interrupt-parent = <&intc>;
-                       interrupts = <7 5>, <8 5>;
-               };
-
                spi0: spi@1200 {
                        compatible = "realtek,rtl8380-spi";
                        reg = <0x1200 0x100>;
                        #size-cells = <0>;
                };
 
+               timer0: timer@3200 {
+                       compatible = "realtek,rtl930x-timer", "realtek,otto-timer";
+                       reg = <0x3200 0x10>, <0x3210 0x10>, <0x3220 0x10>,
+                             <0x3230 0x10>, <0x3240 0x10>;
+
+                       interrupt-parent = <&intc>;
+                       interrupts = <7 4>, <8 4>, <9 4>, <10 4>, <11 4>;
+                       clocks = <&lx_clk>;
+               };
+
                uart0: uart@2000 {
                        compatible = "ns16550a";
                        reg = <0x2000 0x100>;
index 8428c32e4e0af1f43621514b4807d00c0b938511..4027b5319a8a925500099475ea1817fe8ed32975 100644 (file)
@@ -25,7 +25,7 @@ Submitted-by: Birger Koblitz <git@birger-koblitz.de>
  platform-$(CONFIG_SGI_IP28)           += sgi-ip22/
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -1053,8 +1053,59 @@ config NLM_XLP_BOARD
+@@ -1053,8 +1053,58 @@ config NLM_XLP_BOARD
          This board is based on Netlogic XLP Processor.
          Say Y here if you have a XLP based board.
  
@@ -68,8 +68,7 @@ Submitted-by: Birger Koblitz <git@birger-koblitz.de>
 +      bool "Realtek RTL930X based platforms"
 +      depends on RTL83XX
 +      select MIPS_CPU_SCACHE
-+      select CSRC_R4K
-+      select CEVT_RTL9300
++      select MIPS_EXTERNAL_TIMER
 +      select SYS_SUPPORTS_MULTITHREADING
 +
 +config RTL931X
index 5e036166787ebdb52b8b0ad65b0ddbcaeaecfe3a..35365370efa4656ae3d06c32e9db23c1a38e6464 100644 (file)
@@ -9,7 +9,6 @@ CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BOARD_SCACHE=y
-CONFIG_CEVT_RTL9300=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMMON_CLK=y
 # CONFIG_COMMON_CLK_REALTEK is not set
@@ -33,7 +32,6 @@ CONFIG_CPU_SUPPORTS_MSA=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
 CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
 CONFIG_CRYPTO_RNG2=y
-CONFIG_CSRC_R4K=y
 CONFIG_DEBUG_SECTION_MISMATCH=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DTC=y
@@ -113,11 +111,11 @@ CONFIG_MIGRATION=y
 CONFIG_MIPS=y
 CONFIG_MIPS_ASID_BITS=8
 CONFIG_MIPS_ASID_SHIFT=0
-CONFIG_MIPS_CLOCK_VSYSCALL=y
 # CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
 CONFIG_MIPS_CMDLINE_FROM_DTB=y
 CONFIG_MIPS_CPU_SCACHE=y
 CONFIG_MIPS_EBPF_JIT=y
+CONFIG_MIPS_EXTERNAL_TIMER=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 CONFIG_MIPS_LD_CAN_LINK_VDSO=y
 # CONFIG_MIPS_MT_SMP is not set
@@ -166,7 +164,7 @@ CONFIG_POWER_RESET_GPIO_RESTART=y
 CONFIG_POWER_RESET_SYSCON=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_RATIONAL=y
-# CONFIG_REALTEK_OTTO_TIMER is not set
+CONFIG_REALTEK_OTTO_TIMER=y
 CONFIG_REALTEK_OTTO_WDT=y
 CONFIG_REALTEK_PHY=y
 CONFIG_REALTEK_SOC_PHY=y
@@ -199,6 +197,8 @@ CONFIG_SYS_SUPPORTS_MIPS16=y
 CONFIG_SYS_SUPPORTS_MULTITHREADING=y
 CONFIG_TARGET_ISA_REV=2
 CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
 CONFIG_TINY_SRCU=y
 CONFIG_USE_GENERIC_EARLY_PRINTK_8250=y
 CONFIG_USE_OF=y