3834ba7c61941d29d77a9fd155dcffab30094cf3
[openwrt/staging/jow.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,58 @@ 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 MIPS_EXTERNAL_TIMER
64 + select SYS_SUPPORTS_MULTITHREADING
65 +
66 +config RTL930X
67 + bool "Realtek RTL930X based platforms"
68 + depends on RTL83XX
69 + select MIPS_CPU_SCACHE
70 + select CSRC_R4K
71 + select CEVT_RTL9300
72 + select SYS_SUPPORTS_MULTITHREADING
73 +
74 +config RTL931X
75 + bool "Realtek RTL931X based platforms"
76 + depends on RTL930X
77 + select MIPS_GIC
78 + select COMMON_CLK
79 + select CLKSRC_MIPS_GIC
80 + select SYS_SUPPORTS_VPE_LOADER
81 + select SYS_SUPPORTS_SMP
82 + select SYS_SUPPORTS_MIPS_CPS
83 +
84 source "arch/mips/alchemy/Kconfig"
85 source "arch/mips/ath25/Kconfig"
86 source "arch/mips/ath79/Kconfig"
87 @@ -1097,6 +1147,9 @@ config CEVT_GT641XX
88 config CEVT_R4K
89 bool
90
91 +config CEVT_RTL9300
92 + bool
93 +
94 config CEVT_SB1250
95 bool
96