f54bd28242c85137fc8d8ba32a21217da0bd4bb1
[openwrt/staging/dedeckeh.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,59 @@ 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 NO_EXCEPT_FILL
37 + select SYS_HAS_CPU_MIPS32_R1
38 + select SYS_HAS_CPU_MIPS32_R2
39 + select SYS_SUPPORTS_BIG_ENDIAN
40 + select SYS_SUPPORTS_HIGHMEM
41 + select SYS_SUPPORTS_32BIT_KERNEL
42 + select SYS_SUPPORTS_MIPS16
43 + select SYS_HAS_EARLY_PRINTK
44 + select SYS_HAS_EARLY_PRINTK_8250
45 + select USE_GENERIC_EARLY_PRINTK_8250
46 + select BOOT_RAW
47 + select PINCTRL
48 + select ARCH_HAS_RESET_CONTROLLER
49 + select RESET_CONTROLLER
50 + select USE_OF
51 +
52 endchoice
53
54 +config RTL838X
55 + bool "Realtek RTL838X based platforms"
56 + depends on RTL83XX
57 + select CPU_SUPPORTS_CPUFREQ
58 + select MIPS_EXTERNAL_TIMER
59 +
60 +config RTL839X
61 + bool "Realtek RTL839X based platforms"
62 + depends on RTL83XX
63 + select CPU_SUPPORTS_CPUFREQ
64 + select MIPS_EXTERNAL_TIMER
65 + select SYS_SUPPORTS_MULTITHREADING
66 +
67 +config RTL930X
68 + bool "Realtek RTL930X based platforms"
69 + depends on RTL83XX
70 + select MIPS_CPU_SCACHE
71 + select CSRC_R4K
72 + select CEVT_RTL9300
73 + select SYS_SUPPORTS_MULTITHREADING
74 +
75 +config RTL931X
76 + bool "Realtek RTL931X based platforms"
77 + depends on RTL930X
78 + select MIPS_GIC
79 + select COMMON_CLK
80 + select CLKSRC_MIPS_GIC
81 + select SYS_SUPPORTS_VPE_LOADER
82 + select SYS_SUPPORTS_SMP
83 + select SYS_SUPPORTS_MIPS_CPS
84 +
85 source "arch/mips/alchemy/Kconfig"
86 source "arch/mips/ath25/Kconfig"
87 source "arch/mips/ath79/Kconfig"
88 @@ -1097,6 +1147,9 @@ config CEVT_GT641XX
89 config CEVT_R4K
90 bool
91
92 +config CEVT_RTL9300
93 + bool
94 +
95 config CEVT_SB1250
96 bool
97