kernel: bump 4.9 to 4.9.146
[openwrt/openwrt.git] / target / linux / layerscape / patches-4.9 / 201-config-support-layerscape.patch
1 From 0774b97305507af18f8c43efb69aa00e6c57ae90 Mon Sep 17 00:00:00 2001
2 From: Yangbo Lu <yangbo.lu@nxp.com>
3 Date: Fri, 6 Jul 2018 15:31:14 +0800
4 Subject: [PATCH] config: support layerscape
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 This is an integrated patch for layerscape config/makefile support.
10
11 Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
12 Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
13 Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
14 Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
15 Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
16 Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
17 Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
18 ---
19 arch/arm/mach-imx/Kconfig | 1 +
20 drivers/base/Kconfig | 1 +
21 drivers/crypto/Makefile | 2 +-
22 drivers/net/ethernet/freescale/Kconfig | 4 +-
23 drivers/net/ethernet/freescale/Makefile | 2 +
24 drivers/ptp/Kconfig | 29 +++++++++++
25 drivers/rtc/Kconfig | 8 +++
26 drivers/rtc/Makefile | 1 +
27 drivers/soc/Kconfig | 3 +-
28 drivers/soc/fsl/Kconfig | 30 ++++++++++++
29 drivers/soc/fsl/Kconfig.arm | 16 ++++++
30 drivers/soc/fsl/Makefile | 5 ++
31 drivers/soc/fsl/layerscape/Kconfig | 10 ++++
32 drivers/soc/fsl/layerscape/Makefile | 1 +
33 drivers/staging/Kconfig | 6 +++
34 drivers/staging/Makefile | 3 ++
35 drivers/staging/fsl-dpaa2/Kconfig | 65 +++++++++++++++++++++++++
36 drivers/staging/fsl-dpaa2/Makefile | 9 ++++
37 18 files changed, 192 insertions(+), 4 deletions(-)
38 create mode 100644 drivers/soc/fsl/Kconfig
39 create mode 100644 drivers/soc/fsl/Kconfig.arm
40 create mode 100644 drivers/soc/fsl/layerscape/Kconfig
41 create mode 100644 drivers/soc/fsl/layerscape/Makefile
42 create mode 100644 drivers/staging/fsl-dpaa2/Kconfig
43 create mode 100644 drivers/staging/fsl-dpaa2/Makefile
44
45 --- a/arch/arm/mach-imx/Kconfig
46 +++ b/arch/arm/mach-imx/Kconfig
47 @@ -1,6 +1,7 @@
48 menuconfig ARCH_MXC
49 bool "Freescale i.MX family"
50 depends on ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M
51 + select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
52 select ARCH_SUPPORTS_BIG_ENDIAN
53 select CLKSRC_IMX_GPT
54 select GENERIC_IRQ_CHIP
55 --- a/drivers/base/Kconfig
56 +++ b/drivers/base/Kconfig
57 @@ -240,6 +240,7 @@ config GENERIC_CPU_VULNERABILITIES
58
59 config SOC_BUS
60 bool
61 + select GLOB
62
63 source "drivers/base/regmap/Kconfig"
64
65 --- a/drivers/crypto/Makefile
66 +++ b/drivers/crypto/Makefile
67 @@ -3,7 +3,7 @@ obj-$(CONFIG_CRYPTO_DEV_ATMEL_SHA) += at
68 obj-$(CONFIG_CRYPTO_DEV_ATMEL_TDES) += atmel-tdes.o
69 obj-$(CONFIG_CRYPTO_DEV_BFIN_CRC) += bfin_crc.o
70 obj-$(CONFIG_CRYPTO_DEV_CCP) += ccp/
71 -obj-$(CONFIG_CRYPTO_DEV_FSL_CAAM) += caam/
72 +obj-$(CONFIG_CRYPTO_DEV_FSL_CAAM_COMMON) += caam/
73 obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o
74 obj-$(CONFIG_CRYPTO_DEV_HIFN_795X) += hifn_795x.o
75 obj-$(CONFIG_CRYPTO_DEV_IMGTEC_HASH) += img-hash.o
76 --- a/drivers/net/ethernet/freescale/Kconfig
77 +++ b/drivers/net/ethernet/freescale/Kconfig
78 @@ -5,7 +5,7 @@
79 config NET_VENDOR_FREESCALE
80 bool "Freescale devices"
81 default y
82 - depends on FSL_SOC || QUICC_ENGINE || CPM1 || CPM2 || PPC_MPC512x || \
83 + depends on FSL_SOC || (QUICC_ENGINE && PPC32) || CPM1 || CPM2 || PPC_MPC512x || \
84 M523x || M527x || M5272 || M528x || M520x || M532x || \
85 ARCH_MXC || ARCH_MXS || (PPC_MPC52xx && PPC_BESTCOMM) || \
86 ARCH_LAYERSCAPE
87 @@ -93,4 +93,6 @@ config GIANFAR
88 and MPC86xx family of chips, the eTSEC on LS1021A and the FEC
89 on the 8540.
90
91 +source "drivers/net/ethernet/freescale/sdk_fman/Kconfig"
92 +source "drivers/net/ethernet/freescale/sdk_dpaa/Kconfig"
93 endif # NET_VENDOR_FREESCALE
94 --- a/drivers/net/ethernet/freescale/Makefile
95 +++ b/drivers/net/ethernet/freescale/Makefile
96 @@ -21,4 +21,6 @@ gianfar_driver-objs := gianfar.o \
97 obj-$(CONFIG_UCC_GETH) += ucc_geth_driver.o
98 ucc_geth_driver-objs := ucc_geth.o ucc_geth_ethtool.o
99
100 +obj-$(if $(CONFIG_FSL_SDK_FMAN),y) += sdk_fman/
101 +obj-$(if $(CONFIG_FSL_SDK_DPAA_ETH),y) += sdk_dpaa/
102 obj-$(CONFIG_FSL_FMAN) += fman/
103 --- a/drivers/ptp/Kconfig
104 +++ b/drivers/ptp/Kconfig
105 @@ -39,6 +39,35 @@ config PTP_1588_CLOCK_GIANFAR
106 To compile this driver as a module, choose M here: the module
107 will be called gianfar_ptp.
108
109 +config PTP_1588_CLOCK_DPAA
110 + tristate "Freescale DPAA as PTP clock"
111 + depends on FSL_SDK_DPAA_ETH
112 + select PTP_1588_CLOCK
113 + select FSL_DPAA_TS
114 + default n
115 + help
116 + This driver adds support for using the DPAA 1588 timer module
117 + as a PTP clock. This clock is only useful if your PTP programs are
118 + getting hardware time stamps on the PTP Ethernet packets
119 + using the SO_TIMESTAMPING API.
120 +
121 + To compile this driver as a module, choose M here: the module
122 + will be called dpaa_ptp.
123 +
124 +config PTP_1588_CLOCK_DPAA2
125 + tristate "Freescale DPAA2 as PTP clock"
126 + depends on FSL_DPAA2_ETH
127 + select PTP_1588_CLOCK
128 + default y
129 + help
130 + This driver adds support for using the DPAA2 1588 timer module
131 + as a PTP clock. This clock is only useful if your PTP programs are
132 + getting hardware time stamps on the PTP Ethernet packets
133 + using the SO_TIMESTAMPING API.
134 +
135 + To compile this driver as a module, choose M here: the module
136 + will be called dpaa2-rtc.
137 +
138 config PTP_1588_CLOCK_IXP46X
139 tristate "Intel IXP46x as PTP clock"
140 depends on IXP4XX_ETH
141 --- a/drivers/rtc/Kconfig
142 +++ b/drivers/rtc/Kconfig
143 @@ -414,6 +414,14 @@ config RTC_DRV_PCF85063
144 This driver can also be built as a module. If so, the module
145 will be called rtc-pcf85063.
146
147 +config RTC_DRV_PCF85263
148 + tristate "NXP PCF85263"
149 + help
150 + If you say yes here you get support for the PCF85263 RTC chip
151 +
152 + This driver can also be built as a module. If so, the module
153 + will be called rtc-pcf85263.
154 +
155 config RTC_DRV_PCF8563
156 tristate "Philips PCF8563/Epson RTC8564"
157 help
158 --- a/drivers/rtc/Makefile
159 +++ b/drivers/rtc/Makefile
160 @@ -111,6 +111,7 @@ obj-$(CONFIG_RTC_DRV_PCF2127) += rtc-pcf
161 obj-$(CONFIG_RTC_DRV_PCF50633) += rtc-pcf50633.o
162 obj-$(CONFIG_RTC_DRV_PCF85063) += rtc-pcf85063.o
163 obj-$(CONFIG_RTC_DRV_PCF8523) += rtc-pcf8523.o
164 +obj-$(CONFIG_RTC_DRV_PCF85263) += rtc-pcf85263.o
165 obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o
166 obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o
167 obj-$(CONFIG_RTC_DRV_PIC32) += rtc-pic32.o
168 --- a/drivers/soc/Kconfig
169 +++ b/drivers/soc/Kconfig
170 @@ -1,8 +1,7 @@
171 menu "SOC (System On Chip) specific Drivers"
172
173 source "drivers/soc/bcm/Kconfig"
174 -source "drivers/soc/fsl/qbman/Kconfig"
175 -source "drivers/soc/fsl/qe/Kconfig"
176 +source "drivers/soc/fsl/Kconfig"
177 source "drivers/soc/mediatek/Kconfig"
178 source "drivers/soc/qcom/Kconfig"
179 source "drivers/soc/rockchip/Kconfig"
180 --- /dev/null
181 +++ b/drivers/soc/fsl/Kconfig
182 @@ -0,0 +1,30 @@
183 +#
184 +# Freescale SOC drivers
185 +#
186 +
187 +source "drivers/soc/fsl/qbman/Kconfig"
188 +source "drivers/soc/fsl/qe/Kconfig"
189 +source "drivers/soc/fsl/ls2-console/Kconfig"
190 +
191 +config FSL_GUTS
192 + bool
193 + select SOC_BUS
194 + help
195 + The global utilities block controls power management, I/O device
196 + enabling, power-onreset(POR) configuration monitoring, alternate
197 + function selection for multiplexed signals,and clock control.
198 + This driver is to manage and access global utilities block.
199 + Initially only reading SVR and registering soc device are supported.
200 + Other guts accesses, such as reading RCW, should eventually be moved
201 + into this driver as well.
202 +
203 +config FSL_SLEEP_FSM
204 + bool
205 + help
206 + This driver configures a hardware FSM (Finite State Machine) for deep sleep.
207 + The FSM is used to finish clean-ups at the last stage of system entering deep
208 + sleep, and also wakes up system when a wake up event happens.
209 +
210 +if ARM || ARM64
211 +source "drivers/soc/fsl/Kconfig.arm"
212 +endif
213 --- /dev/null
214 +++ b/drivers/soc/fsl/Kconfig.arm
215 @@ -0,0 +1,16 @@
216 +#
217 +# Freescale ARM SOC Drivers
218 +#
219 +
220 +config LS_SOC_DRIVERS
221 + bool "Layerscape Soc Drivers"
222 + depends on ARCH_LAYERSCAPE || SOC_LS1021A
223 + default n
224 + help
225 + Say y here to enable Freescale Layerscape Soc Device Drivers support.
226 + The Soc Drivers provides the device driver that is a specific block
227 + or feature on Layerscape platform.
228 +
229 +if LS_SOC_DRIVERS
230 + source "drivers/soc/fsl/layerscape/Kconfig"
231 +endif
232 --- a/drivers/soc/fsl/Makefile
233 +++ b/drivers/soc/fsl/Makefile
234 @@ -5,3 +5,8 @@
235 obj-$(CONFIG_FSL_DPAA) += qbman/
236 obj-$(CONFIG_QUICC_ENGINE) += qe/
237 obj-$(CONFIG_CPM) += qe/
238 +obj-$(CONFIG_FSL_GUTS) += guts.o
239 +obj-$(CONFIG_FSL_LS2_CONSOLE) += ls2-console/
240 +obj-$(CONFIG_SUSPEND) += rcpm.o
241 +obj-$(CONFIG_LS_SOC_DRIVERS) += layerscape/
242 +obj-$(CONFIG_FSL_SLEEP_FSM) += sleep_fsm.o
243 --- /dev/null
244 +++ b/drivers/soc/fsl/layerscape/Kconfig
245 @@ -0,0 +1,10 @@
246 +#
247 +# Layerscape Soc drivers
248 +#
249 +config FTM_ALARM
250 + bool "FTM alarm driver"
251 + default n
252 + help
253 + Say y here to enable FTM alarm support. The FTM alarm provides
254 + alarm functions for wakeup system from deep sleep. There is only
255 + one FTM can be used in ALARM(FTM 0).
256 --- /dev/null
257 +++ b/drivers/soc/fsl/layerscape/Makefile
258 @@ -0,0 +1 @@
259 +obj-$(CONFIG_FTM_ALARM) += ftm_alarm.o
260 --- a/drivers/staging/Kconfig
261 +++ b/drivers/staging/Kconfig
262 @@ -94,6 +94,8 @@ source "drivers/staging/fbtft/Kconfig"
263
264 source "drivers/staging/fsl-mc/Kconfig"
265
266 +source "drivers/staging/fsl-dpaa2/Kconfig"
267 +
268 source "drivers/staging/wilc1000/Kconfig"
269
270 source "drivers/staging/most/Kconfig"
271 @@ -106,4 +108,8 @@ source "drivers/staging/greybus/Kconfig"
272
273 source "drivers/staging/vc04_services/Kconfig"
274
275 +source "drivers/staging/fsl_qbman/Kconfig"
276 +
277 +source "drivers/staging/fsl_ppfe/Kconfig"
278 +
279 endif # STAGING
280 --- a/drivers/staging/Makefile
281 +++ b/drivers/staging/Makefile
282 @@ -36,9 +36,12 @@ obj-$(CONFIG_UNISYSSPAR) += unisys/
283 obj-$(CONFIG_COMMON_CLK_XLNX_CLKWZRD) += clocking-wizard/
284 obj-$(CONFIG_FB_TFT) += fbtft/
285 obj-$(CONFIG_FSL_MC_BUS) += fsl-mc/
286 +obj-$(CONFIG_FSL_DPAA2) += fsl-dpaa2/
287 obj-$(CONFIG_WILC1000) += wilc1000/
288 obj-$(CONFIG_MOST) += most/
289 obj-$(CONFIG_ISDN_I4L) += i4l/
290 obj-$(CONFIG_KS7010) += ks7010/
291 obj-$(CONFIG_GREYBUS) += greybus/
292 obj-$(CONFIG_BCM2708_VCHIQ) += vc04_services/
293 +obj-$(CONFIG_FSL_SDK_DPA) += fsl_qbman/
294 +obj-$(CONFIG_FSL_PPFE) += fsl_ppfe/
295 --- /dev/null
296 +++ b/drivers/staging/fsl-dpaa2/Kconfig
297 @@ -0,0 +1,65 @@
298 +#
299 +# Freescale DataPath Acceleration Architecture Gen2 (DPAA2) drivers
300 +#
301 +
302 +config FSL_DPAA2
303 + bool "Freescale DPAA2 devices"
304 + depends on FSL_MC_BUS
305 + ---help---
306 + Build drivers for Freescale DataPath Acceleration
307 + Architecture (DPAA2) family of SoCs.
308 +
309 +config FSL_DPAA2_ETH
310 + tristate "Freescale DPAA2 Ethernet"
311 + depends on FSL_DPAA2 && FSL_MC_DPIO
312 + ---help---
313 + Ethernet driver for Freescale DPAA2 SoCs, using the
314 + Freescale MC bus driver
315 +
316 +if FSL_DPAA2_ETH
317 +config FSL_DPAA2_ETH_USE_ERR_QUEUE
318 + bool "Enable Rx error queue"
319 + default n
320 + ---help---
321 + Allow Rx error frames to be enqueued on an error queue
322 + and processed by the driver (by default they are dropped
323 + in hardware).
324 + This may impact performance, recommended for debugging
325 + purposes only.
326 +
327 +# QBMAN_DEBUG requires some additional DPIO APIs
328 +config FSL_DPAA2_ETH_DEBUGFS
329 + depends on DEBUG_FS
330 + bool "Enable debugfs support"
331 + default n
332 + ---help---
333 + Enable advanced statistics through debugfs interface.
334 +
335 +config FSL_DPAA2_ETH_DCB
336 + bool "Data Center Bridging (DCB) Support"
337 + default n
338 + depends on DCB
339 + ---help---
340 + Say Y here if you want to use Data Center Bridging (DCB) features
341 + (PFC) in the driver.
342 +
343 + If unsure, say N.
344 +
345 +config FSL_DPAA2_ETH_CEETM
346 + depends on NET_SCHED
347 + bool "DPAA2 Ethernet CEETM QoS"
348 + default n
349 + ---help---
350 + Enable QoS offloading support through the CEETM hardware block.
351 +endif
352 +
353 +source "drivers/staging/fsl-dpaa2/mac/Kconfig"
354 +source "drivers/staging/fsl-dpaa2/evb/Kconfig"
355 +
356 +config FSL_DPAA2_ETHSW
357 + tristate "Freescale DPAA2 Ethernet Switch"
358 + depends on FSL_DPAA2
359 + depends on NET_SWITCHDEV
360 + ---help---
361 + Driver for Freescale DPAA2 Ethernet Switch. Select
362 + BRIDGE to have support for bridge tools.
363 --- /dev/null
364 +++ b/drivers/staging/fsl-dpaa2/Makefile
365 @@ -0,0 +1,9 @@
366 +#
367 +# Freescale DataPath Acceleration Architecture Gen2 (DPAA2) drivers
368 +#
369 +
370 +obj-$(CONFIG_FSL_DPAA2_ETH) += ethernet/
371 +obj-$(CONFIG_FSL_DPAA2_MAC) += mac/
372 +obj-$(CONFIG_FSL_DPAA2_EVB) += evb/
373 +obj-$(CONFIG_PTP_1588_CLOCK_DPAA2) += rtc/
374 +obj-$(CONFIG_FSL_DPAA2_ETHSW) += ethsw/