realtek: timer driver: activate for RTL838X devices
[openwrt/staging/ansuel.git] / target / linux / realtek / patches-5.10 / 300-mips-add-rtl838x-platform.patch
1 From fce11f68491b46b93df69de0630cd9edb90bc772 Mon Sep 17 00:00:00 2001
2 From: Birger Koblitz <git@birger-koblitz.de>
3 Date: Wed, 29 Dec 2021 21:54:21 +0100
4 Subject: [PATCH] realtek: Create 4 different Realtek Platforms
5
6 Creates RTL83XX as a basic kernel config parameter for the
7 RTL838X, RTL839x, RTL930X and RTL931X platforms with respective
8 configurations for the SoCs, which are introduced in addition.
9
10 Submitted-by: Birger Koblitz <git@birger-koblitz.de>
11 ---
12 arch/mips/Kbuild.platforms | 1 +
13 arch/mips/Kconfig | 57 ++++++++++++++
14 2 files changed, 58 insertions(+)
15
16 --- a/arch/mips/Kbuild.platforms
17 +++ b/arch/mips/Kbuild.platforms
18 @@ -23,6 +23,7 @@ platform-$(CONFIG_PIC32MZDA) += pic32/
19 platform-$(CONFIG_MACH_PISTACHIO) += pistachio/
20 platform-$(CONFIG_RALINK) += ralink/
21 platform-$(CONFIG_MIKROTIK_RB532) += rb532/
22 +platform-$(CONFIG_RTL83XX) += rtl838x/
23 platform-$(CONFIG_SGI_IP22) += sgi-ip22/
24 platform-$(CONFIG_SGI_IP27) += sgi-ip27/
25 platform-$(CONFIG_SGI_IP28) += sgi-ip22/
26 --- a/arch/mips/Kconfig
27 +++ b/arch/mips/Kconfig
28 @@ -1037,8 +1037,60 @@ config NLM_XLP_BOARD
29 This board is based on Netlogic XLP Processor.
30 Say Y here if you have a XLP based board.
31
32 +config RTL83XX
33 + bool "Realtek based platforms"
34 + select DMA_NONCOHERENT
35 + select IRQ_MIPS_CPU
36 + select SYS_HAS_CPU_MIPS32_R1
37 + select SYS_HAS_CPU_MIPS32_R2
38 + select SYS_SUPPORTS_BIG_ENDIAN
39 + select SYS_SUPPORTS_HIGHMEM
40 + select SYS_SUPPORTS_32BIT_KERNEL
41 + select SYS_SUPPORTS_MIPS16
42 + select SYS_HAS_EARLY_PRINTK
43 + select SYS_HAS_EARLY_PRINTK_8250
44 + select USE_GENERIC_EARLY_PRINTK_8250
45 + select BOOT_RAW
46 + select PINCTRL
47 + select ARCH_HAS_RESET_CONTROLLER
48 + select RESET_CONTROLLER
49 + select USE_OF
50 +
51 endchoice
52
53 +config RTL838X
54 + bool "Realtek RTL838X based platforms"
55 + depends on RTL83XX
56 + select CPU_SUPPORTS_CPUFREQ
57 + select MIPS_EXTERNAL_TIMER
58 +
59 +config RTL839X
60 + bool "Realtek RTL839X based platforms"
61 + depends on RTL83XX
62 + select CPU_SUPPORTS_CPUFREQ
63 + select CSRC_R4K
64 + select CEVT_R4K
65 + select MIPS_EXTERNAL_TIMER
66 + select SYS_SUPPORTS_MULTITHREADING
67 +
68 +config RTL930X
69 + bool "Realtek RTL930X based platforms"
70 + depends on RTL83XX
71 + select MIPS_CPU_SCACHE
72 + select CSRC_R4K
73 + select CEVT_RTL9300
74 + select SYS_SUPPORTS_MULTITHREADING
75 +
76 +config RTL931X
77 + bool "Realtek RTL931X based platforms"
78 + depends on RTL930X
79 + select MIPS_GIC
80 + select COMMON_CLK
81 + select CLKSRC_MIPS_GIC
82 + select SYS_SUPPORTS_VPE_LOADER
83 + select SYS_SUPPORTS_SMP
84 + select SYS_SUPPORTS_MIPS_CPS
85 +
86 source "arch/mips/alchemy/Kconfig"
87 source "arch/mips/ath25/Kconfig"
88 source "arch/mips/ath79/Kconfig"
89 @@ -1097,6 +1151,9 @@ config CEVT_GT641XX
90 config CEVT_R4K
91 bool
92
93 +config CEVT_RTL9300
94 + bool
95 +
96 config CEVT_SB1250
97 bool
98