Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'socfpga_update_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/drivers

SoCFPGA updates for v5.13
- Patches from Krzysztof Kozlowski the cleans up and consolidate support for
SoCFPGA platforms
- Rename ARCH_SOCFPGA into ARCH_INTEL_SOCFPGA
- Consolidate ARCH_STRATIX10 into ARCH_INTEL_SOCFPGA
- Consolidate ARCH_AGILEX into ARCH_INTEL_SOCFPGA
- Consolidate ARCH_N5X into ARCH_INTEL_SOCFPGA

* tag 'socfpga_update_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
ARM: socfpga: drop ARCH_SOCFPGA
reset: socfpga: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs
i2c: altera: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs
fpga: altera: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs
dmaengine: socfpga: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs
clk: socfpga: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs (and compile test)
clk: socfpga: allow compile testing of Stratix 10 / Agilex clocks
arm64: socfpga: merge Agilex and N5X into ARCH_INTEL_SOCFPGA
EDAC: altera: merge ARCH_SOCFPGA and ARCH_STRATIX10
clk: socfpga: merge ARCH_SOCFPGA and ARCH_STRATIX10
clk: socfpga: build together Stratix 10, Agilex and N5X clock drivers
net: stmmac: merge ARCH_SOCFPGA and ARCH_STRATIX10
mfd: altera: merge ARCH_SOCFPGA and ARCH_STRATIX10
ARM: socfpga: introduce common ARCH_INTEL_SOCFPGA
clk: socfpga: allow building N5X clocks with ARCH_N5X

Link: https://lore.kernel.org/r/20210330110430.558182-1-dinguyen@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+71 -58
+1 -1
arch/arm/Kconfig
··· 1320 1320 # selected platforms. 1321 1321 config ARCH_NR_GPIO 1322 1322 int 1323 - default 2048 if ARCH_SOCFPGA 1323 + default 2048 if ARCH_INTEL_SOCFPGA 1324 1324 default 1024 if ARCH_BRCMSTB || ARCH_RENESAS || ARCH_TEGRA || \ 1325 1325 ARCH_ZYNQ || ARCH_ASPEED 1326 1326 default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || \
+3 -3
arch/arm/Kconfig.debug
··· 1087 1087 on SD5203 UART. 1088 1088 1089 1089 config DEBUG_SOCFPGA_UART0 1090 - depends on ARCH_SOCFPGA 1090 + depends on ARCH_INTEL_SOCFPGA 1091 1091 bool "Use SOCFPGA UART0 for low-level debug" 1092 1092 select DEBUG_UART_8250 1093 1093 help ··· 1095 1095 on SOCFPGA(Cyclone 5 and Arria 5) based platforms. 1096 1096 1097 1097 config DEBUG_SOCFPGA_ARRIA10_UART1 1098 - depends on ARCH_SOCFPGA 1098 + depends on ARCH_INTEL_SOCFPGA 1099 1099 bool "Use SOCFPGA Arria10 UART1 for low-level debug" 1100 1100 select DEBUG_UART_8250 1101 1101 help ··· 1103 1103 on SOCFPGA(Arria 10) based platforms. 1104 1104 1105 1105 config DEBUG_SOCFPGA_CYCLONE5_UART1 1106 - depends on ARCH_SOCFPGA 1106 + depends on ARCH_INTEL_SOCFPGA 1107 1107 bool "Use SOCFPGA Cyclone 5 UART1 for low-level debug" 1108 1108 select DEBUG_UART_8250 1109 1109 help
+1 -1
arch/arm/Makefile
··· 209 209 machine-$(CONFIG_ARCH_S5PV210) += s5pv210 210 210 machine-$(CONFIG_ARCH_SA1100) += sa1100 211 211 machine-$(CONFIG_ARCH_RENESAS) += shmobile 212 - machine-$(CONFIG_ARCH_SOCFPGA) += socfpga 212 + machine-$(CONFIG_ARCH_INTEL_SOCFPGA) += socfpga 213 213 machine-$(CONFIG_ARCH_STI) += sti 214 214 machine-$(CONFIG_ARCH_STM32) += stm32 215 215 machine-$(CONFIG_ARCH_SUNXI) += sunxi
+1 -1
arch/arm/boot/dts/Makefile
··· 1033 1033 s5pv210-smdkc110.dtb \ 1034 1034 s5pv210-smdkv210.dtb \ 1035 1035 s5pv210-torbreck.dtb 1036 - dtb-$(CONFIG_ARCH_SOCFPGA) += \ 1036 + dtb-$(CONFIG_ARCH_INTEL_SOCFPGA) += \ 1037 1037 socfpga_arria5_socdk.dtb \ 1038 1038 socfpga_arria10_socdk_nand.dtb \ 1039 1039 socfpga_arria10_socdk_qspi.dtb \
+1 -1
arch/arm/configs/multi_v7_defconfig
··· 79 79 CONFIG_ARCH_MSM8974=y 80 80 CONFIG_ARCH_ROCKCHIP=y 81 81 CONFIG_ARCH_RENESAS=y 82 - CONFIG_ARCH_SOCFPGA=y 82 + CONFIG_ARCH_INTEL_SOCFPGA=y 83 83 CONFIG_PLAT_SPEAR=y 84 84 CONFIG_ARCH_SPEAR13XX=y 85 85 CONFIG_MACH_SPEAR1310=y
+1 -1
arch/arm/configs/socfpga_defconfig
··· 9 9 CONFIG_BLK_DEV_INITRD=y 10 10 CONFIG_EMBEDDED=y 11 11 CONFIG_PROFILING=y 12 - CONFIG_ARCH_SOCFPGA=y 12 + CONFIG_ARCH_INTEL_SOCFPGA=y 13 13 CONFIG_ARM_THUMBEE=y 14 14 CONFIG_SMP=y 15 15 CONFIG_NR_CPUS=2
+2 -2
arch/arm/mach-socfpga/Kconfig
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - menuconfig ARCH_SOCFPGA 2 + menuconfig ARCH_INTEL_SOCFPGA 3 3 bool "Altera SOCFPGA family" 4 4 depends on ARCH_MULTI_V7 5 5 select ARCH_SUPPORTS_BIG_ENDIAN ··· 19 19 select PL310_ERRATA_753970 if PL310 20 20 select PL310_ERRATA_769419 21 21 22 - if ARCH_SOCFPGA 22 + if ARCH_INTEL_SOCFPGA 23 23 config SOCFPGA_SUSPEND 24 24 bool "Suspend to RAM on SOCFPGA" 25 25 help
+4 -13
arch/arm64/Kconfig.platforms
··· 8 8 help 9 9 This enables support for the Actions Semiconductor S900 SoC family. 10 10 11 - config ARCH_AGILEX 12 - bool "Intel's Agilex SoCFPGA Family" 13 - help 14 - This enables support for Intel's Agilex SoCFPGA Family. 15 - 16 - config ARCH_N5X 17 - bool "Intel's eASIC N5X SoCFPGA Family" 18 - help 19 - This enables support for Intel's eASIC N5X SoCFPGA Family. 20 - 21 11 config ARCH_SUNXI 22 12 bool "Allwinner sunxi 64-bit SoC Family" 23 13 select ARCH_HAS_RESET_CONTROLLER ··· 244 254 help 245 255 This enables support for AMD Seattle SOC Family 246 256 247 - config ARCH_STRATIX10 248 - bool "Altera's Stratix 10 SoCFPGA Family" 257 + config ARCH_INTEL_SOCFPGA 258 + bool "Intel's SoCFPGA ARMv8 Families" 249 259 help 250 - This enables support for Altera's Stratix 10 SoCFPGA Family. 260 + This enables support for Intel's SoCFPGA ARMv8 families: 261 + Stratix 10 (ex. Altera), Agilex and eASIC N5X. 251 262 252 263 config ARCH_SYNQUACER 253 264 bool "Socionext SynQuacer SoC Family"
+1 -1
arch/arm64/boot/dts/altera/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - dtb-$(CONFIG_ARCH_STRATIX10) += socfpga_stratix10_socdk.dtb \ 2 + dtb-$(CONFIG_ARCH_INTEL_SOCFPGA) += socfpga_stratix10_socdk.dtb \ 3 3 socfpga_stratix10_socdk_nand.dtb
+3 -3
arch/arm64/boot/dts/intel/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - dtb-$(CONFIG_ARCH_AGILEX) += socfpga_agilex_socdk.dtb \ 3 - socfpga_agilex_socdk_nand.dtb 2 + dtb-$(CONFIG_ARCH_INTEL_SOCFPGA) += socfpga_agilex_socdk.dtb \ 3 + socfpga_agilex_socdk_nand.dtb \ 4 + socfpga_n5x_socdk.dtb 4 5 dtb-$(CONFIG_ARCH_KEEMBAY) += keembay-evm.dtb 5 - dtb-$(CONFIG_ARCH_N5X) += socfpga_n5x_socdk.dtb
+1 -1
arch/arm64/configs/defconfig
··· 50 50 CONFIG_ARCH_ROCKCHIP=y 51 51 CONFIG_ARCH_S32=y 52 52 CONFIG_ARCH_SEATTLE=y 53 - CONFIG_ARCH_STRATIX10=y 53 + CONFIG_ARCH_INTEL_SOCFPGA=y 54 54 CONFIG_ARCH_SYNQUACER=y 55 55 CONFIG_ARCH_TEGRA=y 56 56 CONFIG_ARCH_SPRD=y
+1
drivers/clk/Kconfig
··· 394 394 source "drivers/clk/rockchip/Kconfig" 395 395 source "drivers/clk/samsung/Kconfig" 396 396 source "drivers/clk/sifive/Kconfig" 397 + source "drivers/clk/socfpga/Kconfig" 397 398 source "drivers/clk/sprd/Kconfig" 398 399 source "drivers/clk/sunxi/Kconfig" 399 400 source "drivers/clk/sunxi-ng/Kconfig"
+1 -3
drivers/clk/Makefile
··· 104 104 obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/ 105 105 obj-$(CONFIG_COMMON_CLK_SAMSUNG) += samsung/ 106 106 obj-$(CONFIG_CLK_SIFIVE) += sifive/ 107 - obj-$(CONFIG_ARCH_SOCFPGA) += socfpga/ 108 - obj-$(CONFIG_ARCH_AGILEX) += socfpga/ 109 - obj-$(CONFIG_ARCH_STRATIX10) += socfpga/ 107 + obj-y += socfpga/ 110 108 obj-$(CONFIG_PLAT_SPEAR) += spear/ 111 109 obj-y += sprd/ 112 110 obj-$(CONFIG_ARCH_STI) += st/
+19
drivers/clk/socfpga/Kconfig
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + config CLK_INTEL_SOCFPGA 3 + bool "Intel SoCFPGA family clock support" if COMPILE_TEST && !ARCH_INTEL_SOCFPGA 4 + default ARCH_INTEL_SOCFPGA 5 + help 6 + Support for the clock controllers present on Intel SoCFPGA and eASIC 7 + devices like Aria, Cyclone, Stratix 10, Agilex and N5X eASIC. 8 + 9 + if CLK_INTEL_SOCFPGA 10 + 11 + config CLK_INTEL_SOCFPGA32 12 + bool "Intel Aria / Cyclone clock controller support" if COMPILE_TEST && (!ARM || !ARCH_INTEL_SOCFPGA) 13 + default ARM && ARCH_INTEL_SOCFPGA 14 + 15 + config CLK_INTEL_SOCFPGA64 16 + bool "Intel Stratix / Agilex / N5X clock controller support" if COMPILE_TEST && (!ARM64 || !ARCH_INTEL_SOCFPGA) 17 + default ARM64 && ARCH_INTEL_SOCFPGA 18 + 19 + endif # CLK_INTEL_SOCFPGA
+5 -6
drivers/clk/socfpga/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - obj-$(CONFIG_ARCH_SOCFPGA) += clk.o clk-gate.o clk-pll.o clk-periph.o 3 - obj-$(CONFIG_ARCH_SOCFPGA) += clk-pll-a10.o clk-periph-a10.o clk-gate-a10.o 4 - obj-$(CONFIG_ARCH_STRATIX10) += clk-s10.o 5 - obj-$(CONFIG_ARCH_STRATIX10) += clk-pll-s10.o clk-periph-s10.o clk-gate-s10.o 6 - obj-$(CONFIG_ARCH_AGILEX) += clk-agilex.o 7 - obj-$(CONFIG_ARCH_AGILEX) += clk-pll-s10.o clk-periph-s10.o clk-gate-s10.o 2 + obj-$(CONFIG_CLK_INTEL_SOCFPGA32) += clk.o clk-gate.o clk-pll.o clk-periph.o \ 3 + clk-pll-a10.o clk-periph-a10.o clk-gate-a10.o 4 + obj-$(CONFIG_CLK_INTEL_SOCFPGA64) += clk-s10.o \ 5 + clk-pll-s10.o clk-periph-s10.o clk-gate-s10.o \ 6 + clk-agilex.o
+1 -1
drivers/dma/Kconfig
··· 100 100 101 101 config AXI_DMAC 102 102 tristate "Analog Devices AXI-DMAC DMA support" 103 - depends on MICROBLAZE || NIOS2 || ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_SOCFPGA || COMPILE_TEST 103 + depends on MICROBLAZE || NIOS2 || ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_INTEL_SOCFPGA || COMPILE_TEST 104 104 select DMA_ENGINE 105 105 select DMA_VIRTUAL_CHANNELS 106 106 select REGMAP_MMIO
+1 -1
drivers/edac/Kconfig
··· 396 396 397 397 config EDAC_ALTERA 398 398 bool "Altera SOCFPGA ECC" 399 - depends on EDAC=y && (ARCH_SOCFPGA || ARCH_STRATIX10) 399 + depends on EDAC=y && ARCH_INTEL_SOCFPGA 400 400 help 401 401 Support for error detection and correction on the 402 402 Altera SOCs. This is the global enable for the
+11 -6
drivers/edac/altera_edac.c
··· 1501 1501 dci->mod_name = ecc_name; 1502 1502 dci->dev_name = ecc_name; 1503 1503 1504 - /* Update the PortB IRQs - A10 has 4, S10 has 2, Index accordingly */ 1505 - #ifdef CONFIG_ARCH_STRATIX10 1504 + /* 1505 + * Update the PortB IRQs - A10 has 4, S10 has 2, Index accordingly 1506 + * 1507 + * FIXME: Instead of ifdefs with different architectures the driver 1508 + * should properly use compatibles. 1509 + */ 1510 + #ifdef CONFIG_64BIT 1506 1511 altdev->sb_irq = irq_of_parse_and_map(np, 1); 1507 1512 #else 1508 1513 altdev->sb_irq = irq_of_parse_and_map(np, 2); ··· 1526 1521 goto err_release_group_1; 1527 1522 } 1528 1523 1529 - #ifdef CONFIG_ARCH_STRATIX10 1524 + #ifdef CONFIG_64BIT 1530 1525 /* Use IRQ to determine SError origin instead of assigning IRQ */ 1531 1526 rc = of_property_read_u32_index(np, "interrupts", 1, &altdev->db_irq); 1532 1527 if (rc) { ··· 1936 1931 goto err_release_group1; 1937 1932 } 1938 1933 1939 - #ifdef CONFIG_ARCH_STRATIX10 1934 + #ifdef CONFIG_64BIT 1940 1935 /* Use IRQ to determine SError origin instead of assigning IRQ */ 1941 1936 rc = of_property_read_u32_index(np, "interrupts", 0, &altdev->db_irq); 1942 1937 if (rc) { ··· 2021 2016 /************** Stratix 10 EDAC Double Bit Error Handler ************/ 2022 2017 #define to_a10edac(p, m) container_of(p, struct altr_arria10_edac, m) 2023 2018 2024 - #ifdef CONFIG_ARCH_STRATIX10 2019 + #ifdef CONFIG_64BIT 2025 2020 /* panic routine issues reboot on non-zero panic_timeout */ 2026 2021 extern int panic_timeout; 2027 2022 ··· 2114 2109 altr_edac_a10_irq_handler, 2115 2110 edac); 2116 2111 2117 - #ifdef CONFIG_ARCH_STRATIX10 2112 + #ifdef CONFIG_64BIT 2118 2113 { 2119 2114 int dberror, err_addr; 2120 2115
+1 -1
drivers/firmware/Kconfig
··· 206 206 207 207 config INTEL_STRATIX10_SERVICE 208 208 tristate "Intel Stratix10 Service Layer" 209 - depends on (ARCH_STRATIX10 || ARCH_AGILEX) && HAVE_ARM_SMCCC 209 + depends on ARCH_INTEL_SOCFPGA && HAVE_ARM_SMCCC 210 210 default n 211 211 help 212 212 Intel Stratix10 service layer runs at privileged exception level,
+4 -4
drivers/fpga/Kconfig
··· 14 14 15 15 config FPGA_MGR_SOCFPGA 16 16 tristate "Altera SOCFPGA FPGA Manager" 17 - depends on ARCH_SOCFPGA || COMPILE_TEST 17 + depends on ARCH_INTEL_SOCFPGA || COMPILE_TEST 18 18 help 19 19 FPGA manager driver support for Altera SOCFPGA. 20 20 21 21 config FPGA_MGR_SOCFPGA_A10 22 22 tristate "Altera SoCFPGA Arria10" 23 - depends on ARCH_SOCFPGA || COMPILE_TEST 23 + depends on ARCH_INTEL_SOCFPGA || COMPILE_TEST 24 24 select REGMAP_MMIO 25 25 help 26 26 FPGA manager driver support for Altera Arria10 SoCFPGA. ··· 60 60 61 61 config FPGA_MGR_STRATIX10_SOC 62 62 tristate "Intel Stratix10 SoC FPGA Manager" 63 - depends on (ARCH_STRATIX10 && INTEL_STRATIX10_SERVICE) 63 + depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE) 64 64 help 65 65 FPGA manager driver support for the Intel Stratix10 SoC. 66 66 ··· 99 99 100 100 config SOCFPGA_FPGA_BRIDGE 101 101 tristate "Altera SoCFPGA FPGA Bridges" 102 - depends on ARCH_SOCFPGA && FPGA_BRIDGE 102 + depends on ARCH_INTEL_SOCFPGA && FPGA_BRIDGE 103 103 help 104 104 Say Y to enable drivers for FPGA bridges for Altera SOCFPGA 105 105 devices.
+1 -1
drivers/i2c/busses/Kconfig
··· 369 369 370 370 config I2C_ALTERA 371 371 tristate "Altera Soft IP I2C" 372 - depends on ARCH_SOCFPGA || NIOS2 || COMPILE_TEST 372 + depends on ARCH_INTEL_SOCFPGA || NIOS2 || COMPILE_TEST 373 373 depends on OF 374 374 help 375 375 If you say yes to this option, support will be included for the
+2 -2
drivers/mfd/Kconfig
··· 21 21 22 22 config MFD_ALTERA_A10SR 23 23 bool "Altera Arria10 DevKit System Resource chip" 24 - depends on ARCH_SOCFPGA && SPI_MASTER=y && OF 24 + depends on ARCH_INTEL_SOCFPGA && SPI_MASTER=y && OF 25 25 select REGMAP_SPI 26 26 select MFD_CORE 27 27 help ··· 32 32 33 33 config MFD_ALTERA_SYSMGR 34 34 bool "Altera SOCFPGA System Manager" 35 - depends on (ARCH_SOCFPGA || ARCH_STRATIX10) && OF 35 + depends on ARCH_INTEL_SOCFPGA && OF 36 36 select MFD_SYSCON 37 37 help 38 38 Select this to get System Manager support for all Altera branded
+2 -2
drivers/net/ethernet/stmicro/stmmac/Kconfig
··· 140 140 141 141 config DWMAC_SOCFPGA 142 142 tristate "SOCFPGA dwmac support" 143 - default (ARCH_SOCFPGA || ARCH_STRATIX10) 144 - depends on OF && (ARCH_SOCFPGA || ARCH_STRATIX10 || COMPILE_TEST) 143 + default ARCH_INTEL_SOCFPGA 144 + depends on OF && (ARCH_INTEL_SOCFPGA || COMPILE_TEST) 145 145 select MFD_SYSCON 146 146 help 147 147 Support for ethernet controller on Altera SOCFPGA
+3 -3
drivers/reset/Kconfig
··· 183 183 184 184 config RESET_SIMPLE 185 185 bool "Simple Reset Controller Driver" if COMPILE_TEST 186 - default ARCH_AGILEX || ARCH_ASPEED || ARCH_BCM4908 || ARCH_BITMAIN || ARCH_REALTEK || ARCH_STM32 || ARCH_STRATIX10 || ARCH_SUNXI || ARC 186 + default ARCH_ASPEED || ARCH_BCM4908 || ARCH_BITMAIN || ARCH_REALTEK || ARCH_STM32 || (ARCH_INTEL_SOCFPGA && ARM64) || ARCH_SUNXI || ARC 187 187 help 188 188 This enables a simple reset controller driver for reset lines that 189 189 that can be asserted and deasserted by toggling bits in a contiguous, ··· 205 205 This enables the RCC reset controller driver for STM32 MPUs. 206 206 207 207 config RESET_SOCFPGA 208 - bool "SoCFPGA Reset Driver" if COMPILE_TEST && !ARCH_SOCFPGA 209 - default ARCH_SOCFPGA 208 + bool "SoCFPGA Reset Driver" if COMPILE_TEST && (!ARM || !ARCH_INTEL_SOCFPGA) 209 + default ARM && ARCH_INTEL_SOCFPGA 210 210 select RESET_SIMPLE 211 211 help 212 212 This enables the reset driver for the SoCFPGA ARMv7 platforms. This