kernel: bump 4.14 to 4.14.169
[openwrt/staging/hauke.git] / target / linux / brcm63xx / patches-4.14 / 391-MIPS-BCM63XX-do-not-register-uart.patch
1 --- a/arch/mips/bcm63xx/Makefile
2 +++ b/arch/mips/bcm63xx/Makefile
3 @@ -1,7 +1,7 @@
4 # SPDX-License-Identifier: GPL-2.0
5 obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
6 setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \
7 - dev-rng.o dev-uart.o dev-wdt.o dev-usb-ehci.o \
8 + dev-rng.o dev-wdt.o dev-usb-ehci.o \
9 dev-usb-ohci.o dev-usb-usbd.o usb-common.o sprom.o
10 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
11
12 --- a/arch/mips/bcm63xx/dev-uart.c
13 +++ /dev/null
14 @@ -1,76 +0,0 @@
15 -/*
16 - * This file is subject to the terms and conditions of the GNU General Public
17 - * License. See the file "COPYING" in the main directory of this archive
18 - * for more details.
19 - *
20 - * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
21 - */
22 -
23 -#include <linux/init.h>
24 -#include <linux/kernel.h>
25 -#include <linux/platform_device.h>
26 -#include <bcm63xx_cpu.h>
27 -
28 -static struct resource uart0_resources[] = {
29 - {
30 - /* start & end filled at runtime */
31 - .flags = IORESOURCE_MEM,
32 - },
33 - {
34 - /* start filled at runtime */
35 - .flags = IORESOURCE_IRQ,
36 - },
37 -};
38 -
39 -static struct resource uart1_resources[] = {
40 - {
41 - /* start & end filled at runtime */
42 - .flags = IORESOURCE_MEM,
43 - },
44 - {
45 - /* start filled at runtime */
46 - .flags = IORESOURCE_IRQ,
47 - },
48 -};
49 -
50 -static struct platform_device bcm63xx_uart_devices[] = {
51 - {
52 - .name = "bcm63xx_uart",
53 - .id = 0,
54 - .num_resources = ARRAY_SIZE(uart0_resources),
55 - .resource = uart0_resources,
56 - },
57 -
58 - {
59 - .name = "bcm63xx_uart",
60 - .id = 1,
61 - .num_resources = ARRAY_SIZE(uart1_resources),
62 - .resource = uart1_resources,
63 - }
64 -};
65 -
66 -int __init bcm63xx_uart_register(unsigned int id)
67 -{
68 - if (id >= ARRAY_SIZE(bcm63xx_uart_devices))
69 - return -ENODEV;
70 -
71 - if (id == 1 && (!BCMCPU_IS_3368() && !BCMCPU_IS_6358() &&
72 - !BCMCPU_IS_6368()))
73 - return -ENODEV;
74 -
75 - if (id == 0) {
76 - uart0_resources[0].start = bcm63xx_regset_address(RSET_UART0);
77 - uart0_resources[0].end = uart0_resources[0].start +
78 - RSET_UART_SIZE - 1;
79 - uart0_resources[1].start = bcm63xx_get_irq_number(IRQ_UART0);
80 - }
81 -
82 - if (id == 1) {
83 - uart1_resources[0].start = bcm63xx_regset_address(RSET_UART1);
84 - uart1_resources[0].end = uart1_resources[0].start +
85 - RSET_UART_SIZE - 1;
86 - uart1_resources[1].start = bcm63xx_get_irq_number(IRQ_UART1);
87 - }
88 -
89 - return platform_device_register(&bcm63xx_uart_devices[id]);
90 -}
91 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h
92 +++ /dev/null
93 @@ -1,7 +0,0 @@
94 -/* SPDX-License-Identifier: GPL-2.0 */
95 -#ifndef BCM63XX_DEV_UART_H_
96 -#define BCM63XX_DEV_UART_H_
97 -
98 -int bcm63xx_uart_register(unsigned int id);
99 -
100 -#endif /* BCM63XX_DEV_UART_H_ */
101 --- a/arch/mips/bcm63xx/boards/board_common.c
102 +++ b/arch/mips/bcm63xx/boards/board_common.c
103 @@ -20,7 +20,6 @@
104 #include <asm/prom.h>
105 #include <bcm63xx_board.h>
106 #include <bcm63xx_cpu.h>
107 -#include <bcm63xx_dev_uart.h>
108 #include <bcm63xx_regs.h>
109 #include <bcm63xx_io.h>
110 #include <bcm63xx_gpio.h>
111 @@ -189,12 +188,6 @@ int __init board_register_devices(void)
112
113 bcm63xx_gpio_init();
114
115 - if (board.has_uart0)
116 - bcm63xx_uart_register(0);
117 -
118 - if (board.has_uart1)
119 - bcm63xx_uart_register(1);
120 -
121 if (board.has_pccard)
122 bcm63xx_pcmcia_register();
123
124 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
125 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
126 @@ -35,9 +35,6 @@ static struct board_info __initdata boar
127 .name = "CVG834G_E15R3921",
128 .expected_cpu_id = 0x3368,
129
130 - .has_uart0 = 1,
131 - .has_uart1 = 1,
132 -
133 .has_enet0 = 1,
134 .has_pci = 1,
135
136 @@ -67,7 +64,6 @@ static struct board_info __initdata boar
137 .name = "96328avng",
138 .expected_cpu_id = 0x6328,
139
140 - .has_uart0 = 1,
141 .has_pci = 1,
142 .has_usbd = 0,
143 .use_fallback_sprom = 1,
144 @@ -116,7 +112,6 @@ static struct board_info __initdata boar
145 .name = "96338GW",
146 .expected_cpu_id = 0x6338,
147
148 - .has_uart0 = 1,
149 .has_enet0 = 1,
150 .enet0 = {
151 .force_speed_100 = 1,
152 @@ -159,7 +154,6 @@ static struct board_info __initdata boar
153 .name = "96338W",
154 .expected_cpu_id = 0x6338,
155
156 - .has_uart0 = 1,
157 .has_enet0 = 1,
158 .enet0 = {
159 .force_speed_100 = 1,
160 @@ -204,8 +198,6 @@ static struct board_info __initdata boar
161 static struct board_info __initdata board_96345gw2 = {
162 .name = "96345GW2",
163 .expected_cpu_id = 0x6345,
164 -
165 - .has_uart0 = 1,
166 };
167 #endif
168
169 @@ -217,7 +209,6 @@ static struct board_info __initdata boar
170 .name = "96348R",
171 .expected_cpu_id = 0x6348,
172
173 - .has_uart0 = 1,
174 .has_enet0 = 1,
175 .has_pci = 1,
176 .use_fallback_sprom = 1,
177 @@ -262,7 +253,6 @@ static struct board_info __initdata boar
178 .name = "96348GW-10",
179 .expected_cpu_id = 0x6348,
180
181 - .has_uart0 = 1,
182 .has_enet0 = 1,
183 .has_enet1 = 1,
184 .has_pci = 1,
185 @@ -315,7 +305,6 @@ static struct board_info __initdata boar
186 .name = "96348GW-11",
187 .expected_cpu_id = 0x6348,
188
189 - .has_uart0 = 1,
190 .has_enet0 = 1,
191 .has_enet1 = 1,
192 .has_pci = 1,
193 @@ -370,7 +359,6 @@ static struct board_info __initdata boar
194 .name = "96348GW",
195 .expected_cpu_id = 0x6348,
196
197 - .has_uart0 = 1,
198 .has_enet0 = 1,
199 .has_enet1 = 1,
200 .has_pci = 1,
201 @@ -421,7 +409,6 @@ static struct board_info __initdata boar
202 .name = "F@ST2404",
203 .expected_cpu_id = 0x6348,
204
205 - .has_uart0 = 1,
206 .has_enet0 = 1,
207 .has_enet1 = 1,
208 .has_pci = 1,
209 @@ -466,7 +453,6 @@ static struct board_info __initdata boar
210 .name = "DV201AMR",
211 .expected_cpu_id = 0x6348,
212
213 - .has_uart0 = 1,
214 .has_pci = 1,
215 .use_fallback_sprom = 1,
216 .has_ohci0 = 1,
217 @@ -487,7 +473,6 @@ static struct board_info __initdata boar
218 .name = "96348GW-A",
219 .expected_cpu_id = 0x6348,
220
221 - .has_uart0 = 1,
222 .has_enet0 = 1,
223 .has_enet1 = 1,
224 .has_pci = 1,
225 @@ -514,7 +499,6 @@ static struct board_info __initdata boar
226 .name = "96358VW",
227 .expected_cpu_id = 0x6358,
228
229 - .has_uart0 = 1,
230 .has_enet0 = 1,
231 .has_enet1 = 1,
232 .has_pci = 1,
233 @@ -567,7 +551,6 @@ static struct board_info __initdata boar
234 .name = "96358VW2",
235 .expected_cpu_id = 0x6358,
236
237 - .has_uart0 = 1,
238 .has_enet0 = 1,
239 .has_enet1 = 1,
240 .has_pci = 1,
241 @@ -617,7 +600,6 @@ static struct board_info __initdata boar
242 .name = "AGPF-S0",
243 .expected_cpu_id = 0x6358,
244
245 - .has_uart0 = 1,
246 .has_enet0 = 1,
247 .has_enet1 = 1,
248 .has_pci = 1,
249 --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
250 +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
251 @@ -32,8 +32,6 @@ struct board_info {
252 unsigned int has_ohci0:1;
253 unsigned int has_ehci0:1;
254 unsigned int has_usbd:1;
255 - unsigned int has_uart0:1;
256 - unsigned int has_uart1:1;
257 unsigned int use_fallback_sprom:1;
258
259 /* ethernet config */