brcm2708: Fix compile after adding kernel 4.9.82
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.9 / 950-0121-ARM64-Make-it-work-again-on-4.9-1790.patch
1 From fe3c34c6196cfc708a515e44dd432da0e6cc0aba Mon Sep 17 00:00:00 2001
2 From: Electron752 <mzoran@crowfest.net>
3 Date: Thu, 12 Jan 2017 07:07:08 -0800
4 Subject: [PATCH] ARM64: Make it work again on 4.9 (#1790)
5
6 * Invoke the dtc compiler with the same options used in arm mode.
7 * ARM64 now uses the bcm2835 platform just like ARM32.
8 * ARM64: Update bcmrpi3_defconfig
9
10 Signed-off-by: Michael Zoran <mzoran@crowfest.net>
11 ---
12 arch/arm64/Kconfig.platforms | 22 ------
13 arch/arm64/boot/dts/broadcom/Makefile | 10 ++-
14 arch/arm64/boot/dts/overlays | 1 +
15 arch/arm64/configs/bcmrpi3_defconfig | 126 ++++++++++------------------------
16 4 files changed, 48 insertions(+), 111 deletions(-)
17 create mode 120000 arch/arm64/boot/dts/overlays
18
19 --- a/arch/arm64/Kconfig.platforms
20 +++ b/arch/arm64/Kconfig.platforms
21 @@ -1,27 +1,5 @@
22 menu "Platform selection"
23
24 -config MACH_BCM2709
25 - bool
26 -
27 -config ARCH_BCM2709
28 - bool "Broadcom BCM2709 family"
29 - select MACH_BCM2709
30 - select HAVE_SMP
31 - select ARM_AMBA
32 - select COMMON_CLK
33 - select ARCH_HAS_CPUFREQ
34 - select GENERIC_CLOCKEVENTS
35 - select MULTI_IRQ_HANDLER
36 - select SPARSE_IRQ
37 - select MFD_SYSCON
38 - select VC4
39 - select USE_OF
40 - select ARCH_REQUIRE_GPIOLIB
41 - select PINCTRL
42 - select PINCTRL_BCM2835
43 - help
44 - This enables support for Broadcom BCM2709 boards.
45 -
46 config ARCH_SUNXI
47 bool "Allwinner sunxi 64-bit SoC Family"
48 select GENERIC_IRQ_CHIP
49 --- a/arch/arm64/boot/dts/broadcom/Makefile
50 +++ b/arch/arm64/boot/dts/broadcom/Makefile
51 @@ -1,7 +1,15 @@
52 +# Enable fixups to support overlays on BCM2835 platforms
53 +
54 +ifeq ($(CONFIG_ARCH_BCM2835),y)
55 +DTC_FLAGS ?= -@ -H epapr
56 +endif
57 +
58 dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb
59 dtb-$(CONFIG_ARCH_BCM_IPROC) += ns2-svk.dtb
60 dtb-$(CONFIG_ARCH_VULCAN) += vulcan-eval.dtb
61 -dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-3-b.dtb
62 +dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b.dtb
63 +
64 +dts-dirs += ../overlays
65
66 always := $(dtb-y)
67 subdir-y := $(dts-dirs)
68 diff --git a/arch/arm64/boot/dts/overlays b/arch/arm64/boot/dts/overlays
69 new file mode 120000
70 index 0000000..ded0864
71 --- /dev/null
72 +++ b/arch/arm64/boot/dts/overlays
73 @@ -0,0 +1 @@
74 +../../../arm/boot/dts/overlays
75 \ No newline at end of file
76 --- a/arch/arm64/configs/bcmrpi3_defconfig
77 +++ b/arch/arm64/configs/bcmrpi3_defconfig
78 @@ -1,52 +1,9 @@
79 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set
80 -CONFIG_PHYS_OFFSET=0
81 CONFIG_LOCALVERSION="-v8"
82 # CONFIG_LOCALVERSION_AUTO is not set
83 -CONFIG_64BIT=y
84 CONFIG_SYSVIPC=y
85 CONFIG_POSIX_MQUEUE=y
86 CONFIG_NO_HZ=y
87 CONFIG_HIGH_RES_TIMERS=y
88 -
89 -#
90 -# ARM errata workarounds via the alternatives framework
91 -#
92 -CONFIG_ARM64_ERRATUM_826319=n
93 -CONFIG_ARM64_ERRATUM_827319=n
94 -CONFIG_ARM64_ERRATUM_824069=n
95 -CONFIG_ARM64_ERRATUM_819472=n
96 -CONFIG_ARM64_ERRATUM_832075=n
97 -CONFIG_ARM64_ERRATUM_845719=n
98 -CONFIG_ARM64_ERRATUM_843419=n
99 -CONFIG_CAVIUM_ERRATUM_22375=n
100 -CONFIG_CAVIUM_ERRATUM_23154=n
101 -CONFIG_CAVIUM_ERRATUM_27456=n
102 -CONFIG_ARM64_4K_PAGES=y
103 -CONFIG_ARM64_VA_BITS_39=y
104 -CONFIG_ARM64_VA_BITS=39
105 -CONFIG_SCHED_MC=y
106 -CONFIG_NR_CPUS=4
107 -CONFIG_HOTPLUG_CPU=y
108 -CONFIG_ARMV8_DEPRECATED=y
109 -CONFIG_SWP_EMULATION=y
110 -CONFIG_CP15_BARRIER_EMULATION=y
111 -CONFIG_SETEND_EMULATION=y
112 -
113 -#
114 -# ARMv8.1 architectural features
115 -#
116 -CONFIG_ARM64_HW_AFDBM=y
117 -CONFIG_ARM64_PAN=y
118 -CONFIG_ARM64_LSE_ATOMICS=y
119 -CONFIG_ARM64_VHE=y
120 -
121 -#
122 -# ARMv8.2 architectural features
123 -#
124 -CONFIG_ARM64_UAO=y
125 -CONFIG_ARM64_MODULE_CMODEL_LARGE=n
126 -CONFIG_RANDOMIZE_BASE=n
127 -
128 CONFIG_BSD_PROCESS_ACCT=y
129 CONFIG_BSD_PROCESS_ACCT_V3=y
130 CONFIG_TASKSTATS=y
131 @@ -55,7 +12,6 @@ CONFIG_TASK_XACCT=y
132 CONFIG_TASK_IO_ACCOUNTING=y
133 CONFIG_IKCONFIG=m
134 CONFIG_IKCONFIG_PROC=y
135 -CONFIG_NMI_LOG_BUF_SHIFT=12
136 CONFIG_MEMCG=y
137 CONFIG_BLK_CGROUP=y
138 CONFIG_CGROUP_FREEZER=y
139 @@ -69,54 +25,49 @@ CONFIG_BLK_DEV_INITRD=y
140 CONFIG_EMBEDDED=y
141 # CONFIG_COMPAT_BRK is not set
142 CONFIG_PROFILING=y
143 -CONFIG_OPROFILE=m
144 CONFIG_KPROBES=y
145 CONFIG_JUMP_LABEL=y
146 CONFIG_MODULES=y
147 CONFIG_MODULE_UNLOAD=y
148 CONFIG_MODVERSIONS=y
149 CONFIG_MODULE_SRCVERSION_ALL=y
150 -CONFIG_TRIM_UNUSED_KSYMS=y
151 CONFIG_BLK_DEV_THROTTLING=y
152 CONFIG_PARTITION_ADVANCED=y
153 CONFIG_MAC_PARTITION=y
154 CONFIG_CFQ_GROUP_IOSCHED=y
155 -CONFIG_ARCH_BCM2709=y
156 -# CONFIG_CACHE_L2X0 is not set
157 -CONFIG_SMP=y
158 -CONFIG_HAVE_ARM_ARCH_TIMER=y
159 -CONFIG_VMSPLIT_2G=y
160 -CONFIG_PREEMPT_VOLUNTARY=y
161 -CONFIG_AEABI=y
162 -CONFIG_OABI_COMPAT=y
163 -# CONFIG_CPU_SW_DOMAIN_PAN is not set
164 +CONFIG_ARCH_BCM2835=y
165 +# CONFIG_CAVIUM_ERRATUM_22375 is not set
166 +# CONFIG_CAVIUM_ERRATUM_23154 is not set
167 +# CONFIG_CAVIUM_ERRATUM_27456 is not set
168 +CONFIG_SCHED_MC=y
169 +CONFIG_NR_CPUS=4
170 +CONFIG_PREEMPT=y
171 +CONFIG_HZ_1000=y
172 CONFIG_CLEANCACHE=y
173 CONFIG_FRONTSWAP=y
174 CONFIG_CMA=y
175 CONFIG_ZSMALLOC=m
176 CONFIG_PGTABLE_MAPPING=y
177 -CONFIG_UACCESS_WITH_MEMCPY=y
178 CONFIG_SECCOMP=y
179 -# CONFIG_ATAGS is not set
180 -CONFIG_ZBOOT_ROM_TEXT=0x0
181 -CONFIG_ZBOOT_ROM_BSS=0x0
182 +CONFIG_ARMV8_DEPRECATED=y
183 +CONFIG_SWP_EMULATION=y
184 +CONFIG_CP15_BARRIER_EMULATION=y
185 +CONFIG_SETEND_EMULATION=y
186 CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
187 +CONFIG_BINFMT_MISC=y
188 +CONFIG_COMPAT=y
189 +# CONFIG_SUSPEND is not set
190 +CONFIG_PM=y
191 +CONFIG_CPU_IDLE=y
192 +CONFIG_ARM_CPUIDLE=y
193 CONFIG_CPU_FREQ=y
194 +CONFIG_CPU_FREQ_STAT=y
195 CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
196 CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
197 CONFIG_CPU_FREQ_GOV_USERSPACE=y
198 CONFIG_CPU_FREQ_GOV_ONDEMAND=y
199 CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
200 CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
201 -CONFIG_VFP=y
202 -CONFIG_NEON=y
203 -CONFIG_KERNEL_MODE_NEON=y
204 -CONFIG_BINFMT_MISC=m
205 -CONFIG_COMPAT=y
206 -CONFIG_SYSVIPC_COMPAT=y
207 -
208 -# CONFIG_SUSPEND is not set
209 -CONFIG_PM=y
210 CONFIG_NET=y
211 CONFIG_PACKET=y
212 CONFIG_UNIX=y
213 @@ -437,6 +388,7 @@ CONFIG_BT_MRVL=m
214 CONFIG_BT_MRVL_SDIO=m
215 CONFIG_BT_ATH3K=m
216 CONFIG_BT_WILINK=m
217 +CONFIG_CFG80211=m
218 CONFIG_MAC80211=m
219 CONFIG_MAC80211_MESH=y
220 CONFIG_WIMAX=m
221 @@ -490,7 +442,6 @@ CONFIG_BONDING=m
222 CONFIG_DUMMY=m
223 CONFIG_IFB=m
224 CONFIG_MACVLAN=m
225 -CONFIG_IPVLAN=m
226 CONFIG_VXLAN=m
227 CONFIG_NETCONSOLE=m
228 CONFIG_TUN=m
229 @@ -579,8 +530,6 @@ CONFIG_RT2800USB_RT3573=y
230 CONFIG_RT2800USB_RT53XX=y
231 CONFIG_RT2800USB_RT55XX=y
232 CONFIG_RT2800USB_UNKNOWN=y
233 -CONFIG_RTL8187=m
234 -CONFIG_RTL8192CU=n
235 CONFIG_USB_ZD1201=m
236 CONFIG_ZD1211RW=m
237 CONFIG_MAC80211_HWSIM=m
238 @@ -606,7 +555,7 @@ CONFIG_JOYSTICK_RPISENSE=m
239 CONFIG_INPUT_TOUCHSCREEN=y
240 CONFIG_TOUCHSCREEN_ADS7846=m
241 CONFIG_TOUCHSCREEN_EGALAX=m
242 -CONFIG_TOUCHSCREEN_FT6236=m
243 +CONFIG_TOUCHSCREEN_EKTF2127=m
244 CONFIG_TOUCHSCREEN_RPI_FT5406=m
245 CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
246 CONFIG_TOUCHSCREEN_STMPE=m
247 @@ -626,10 +575,8 @@ CONFIG_SERIO_RAW=m
248 CONFIG_GAMEPORT=m
249 CONFIG_GAMEPORT_NS558=m
250 CONFIG_GAMEPORT_L4=m
251 -CONFIG_BRCM_CHAR_DRIVERS=n
252 -CONFIG_BCM_VC_CMA=n
253 -CONFIG_BCM_VCIO=n
254 -CONFIG_BCM_VC_SM=n
255 +# CONFIG_BCM2835_DEVGPIOMEM is not set
256 +# CONFIG_BCM2835_SMI_DEV is not set
257 # CONFIG_LEGACY_PTYS is not set
258 # CONFIG_DEVKMEM is not set
259 CONFIG_SERIAL_8250=y
260 @@ -638,6 +585,9 @@ CONFIG_SERIAL_8250_CONSOLE=y
261 # CONFIG_SERIAL_8250_DMA is not set
262 CONFIG_SERIAL_8250_NR_UARTS=1
263 CONFIG_SERIAL_8250_RUNTIME_UARTS=0
264 +CONFIG_SERIAL_8250_EXTENDED=y
265 +CONFIG_SERIAL_8250_SHARE_IRQ=y
266 +CONFIG_SERIAL_8250_BCM2835AUX=y
267 CONFIG_SERIAL_OF_PLATFORM=y
268 CONFIG_SERIAL_AMBA_PL011=y
269 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
270 @@ -650,6 +600,7 @@ CONFIG_I2C=y
271 CONFIG_I2C_CHARDEV=m
272 CONFIG_I2C_MUX_PCA954x=m
273 CONFIG_I2C_BCM2708=m
274 +CONFIG_I2C_BCM2835=m
275 CONFIG_I2C_GPIO=m
276 CONFIG_SPI=y
277 CONFIG_SPI_BCM2835=m
278 @@ -681,13 +632,13 @@ CONFIG_W1_SLAVE_DS2780=m
279 CONFIG_W1_SLAVE_DS2781=m
280 CONFIG_W1_SLAVE_DS28E04=m
281 CONFIG_W1_SLAVE_BQ27000=m
282 -CONFIG_BATTERY_DS2760=m
283 -CONFIG_POWER_RESET=y
284 CONFIG_POWER_RESET_GPIO=y
285 +CONFIG_BATTERY_DS2760=m
286 CONFIG_HWMON=m
287 CONFIG_SENSORS_LM75=m
288 CONFIG_SENSORS_SHT21=m
289 CONFIG_SENSORS_SHTC1=m
290 +CONFIG_SENSORS_INA2XX=m
291 CONFIG_THERMAL=y
292 CONFIG_THERMAL_BCM2835=y
293 CONFIG_WATCHDOG=y
294 @@ -835,8 +786,6 @@ CONFIG_VIDEO_EM28XX_V4L2=m
295 CONFIG_VIDEO_EM28XX_ALSA=m
296 CONFIG_VIDEO_EM28XX_DVB=m
297 CONFIG_V4L_PLATFORM_DRIVERS=y
298 -CONFIG_VIDEO_BCM2835=n
299 -CONFIG_VIDEO_BCM2835_MMAL=n
300 CONFIG_RADIO_SI470X=y
301 CONFIG_USB_SI470X=m
302 CONFIG_I2C_SI470X=m
303 @@ -892,8 +841,6 @@ CONFIG_SND_VIRMIDI=m
304 CONFIG_SND_MTPAV=m
305 CONFIG_SND_SERIAL_U16550=m
306 CONFIG_SND_MPU401=m
307 -CONFIG_SND_ARM=n
308 -CONFIG_SND_BCM2835=n
309 CONFIG_SND_USB_AUDIO=m
310 CONFIG_SND_USB_UA101=m
311 CONFIG_SND_USB_CAIAQ=m
312 @@ -916,7 +863,10 @@ CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m
313 CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m
314 CONFIG_SND_DIGIDAC1_SOUNDCARD=m
315 CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m
316 +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m
317 +CONFIG_SND_PISOUND=m
318 CONFIG_SND_SOC_ADAU1701=m
319 +CONFIG_SND_SOC_AK4554=m
320 CONFIG_SND_SOC_WM8804_I2C=m
321 CONFIG_SND_SIMPLE_CARD=m
322 CONFIG_SOUND_PRIME=m
323 @@ -979,8 +929,6 @@ CONFIG_USB_HIDDEV=y
324 CONFIG_USB=y
325 CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
326 CONFIG_USB_MON=m
327 -CONFIG_USB_DWCOTG=n
328 -CONFIG_USB_DWC2=y
329 CONFIG_USB_PRINTER=m
330 CONFIG_USB_STORAGE=y
331 CONFIG_USB_STORAGE_REALTEK=m
332 @@ -1001,6 +949,7 @@ CONFIG_USB_MICROTEK=m
333 CONFIG_USBIP_CORE=m
334 CONFIG_USBIP_VHCI_HCD=m
335 CONFIG_USBIP_HOST=m
336 +CONFIG_USB_DWC2=y
337 CONFIG_USB_SERIAL=m
338 CONFIG_USB_SERIAL_GENERIC=y
339 CONFIG_USB_SERIAL_AIRCABLE=m
340 @@ -1096,6 +1045,7 @@ CONFIG_LEDS_TRIGGER_INPUT=y
341 CONFIG_LEDS_TRIGGER_PANIC=y
342 CONFIG_RTC_CLASS=y
343 # CONFIG_RTC_HCTOSYS is not set
344 +CONFIG_RTC_DRV_ABX80X=m
345 CONFIG_RTC_DRV_DS1307=m
346 CONFIG_RTC_DRV_DS1374=m
347 CONFIG_RTC_DRV_DS1672=m
348 @@ -1103,7 +1053,6 @@ CONFIG_RTC_DRV_MAX6900=m
349 CONFIG_RTC_DRV_RS5C372=m
350 CONFIG_RTC_DRV_ISL1208=m
351 CONFIG_RTC_DRV_ISL12022=m
352 -CONFIG_RTC_DRV_ISL12057=m
353 CONFIG_RTC_DRV_X1205=m
354 CONFIG_RTC_DRV_PCF8523=m
355 CONFIG_RTC_DRV_PCF8563=m
356 @@ -1137,7 +1086,6 @@ CONFIG_STAGING=y
357 CONFIG_PRISM2_USB=m
358 CONFIG_R8712U=m
359 CONFIG_R8188EU=m
360 -CONFIG_R8723AU=m
361 CONFIG_VT6656=m
362 CONFIG_SPEAKUP=m
363 CONFIG_SPEAKUP_SYNTH_SOFT=m
364 @@ -1153,6 +1101,7 @@ CONFIG_FB_TFT_BD663474=m
365 CONFIG_FB_TFT_HX8340BN=m
366 CONFIG_FB_TFT_HX8347D=m
367 CONFIG_FB_TFT_HX8353D=m
368 +CONFIG_FB_TFT_HX8357D=m
369 CONFIG_FB_TFT_ILI9163=m
370 CONFIG_FB_TFT_ILI9320=m
371 CONFIG_FB_TFT_ILI9325=m
372 @@ -1176,6 +1125,7 @@ CONFIG_FB_TFT_UPD161704=m
373 CONFIG_FB_TFT_WATTEROTT=m
374 CONFIG_FB_FLEX=m
375 CONFIG_FB_TFT_FBTFT_DEVICE=m
376 +# CONFIG_BCM2708_VCHIQ is not set
377 CONFIG_MAILBOX=y
378 CONFIG_BCM2835_MBOX=y
379 # CONFIG_IOMMU_SUPPORT is not set
380 @@ -1189,6 +1139,7 @@ CONFIG_IIO_KFIFO_BUF=m
381 CONFIG_MCP320X=m
382 CONFIG_MCP3422=m
383 CONFIG_DHT11=m
384 +CONFIG_HTU21=m
385 CONFIG_PWM_BCM2835=m
386 CONFIG_PWM_PCA9685=m
387 CONFIG_RASPBERRYPI_FIRMWARE=y
388 @@ -1309,6 +1260,7 @@ CONFIG_BOOT_PRINTK_DELAY=y
389 CONFIG_DEBUG_MEMORY_INIT=y
390 CONFIG_DETECT_HUNG_TASK=y
391 CONFIG_TIMER_STATS=y
392 +CONFIG_LATENCYTOP=y
393 CONFIG_IRQSOFF_TRACER=y
394 CONFIG_SCHED_TRACER=y
395 CONFIG_STACK_TRACER=y
396 @@ -1331,5 +1283,3 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=m
397 CONFIG_ARM64_CRYPTO=y
398 CONFIG_CRC_ITU_T=y
399 CONFIG_LIBCRC32C=y
400 -CONFIG_BCM2708_VCHIQ=n
401 -CONFIG_ARCH_BCM2835=y