@@ -12,19 +12,6 @@ menuconfig FPGA
if FPGA
-config FPGA_MGR_ICE40_SPI
- tristate "Lattice iCE40 SPI"
- depends on OF && SPI
- help
- FPGA manager driver support for Lattice iCE40 FPGAs over SPI.
-
-config FPGA_MGR_MACHXO2_SPI
- tristate "Lattice MachXO2 SPI"
- depends on SPI
- help
- FPGA manager driver support for Lattice MachXO2 configuration
- over slave SPI interface.
-
config FPGA_BRIDGE
tristate "FPGA Bridge Framework"
help
@@ -48,6 +35,7 @@ config OF_FPGA_REGION
source "drivers/fpga/altera/Kconfig"
source "drivers/fpga/dfl/Kconfig"
+source "drivers/fpga/lattice/Kconfig"
source "drivers/fpga/xilinx/Kconfig"
endif # FPGA
@@ -4,19 +4,16 @@
#
# Core FPGA Manager Framework
-obj-$(CONFIG_FPGA) += fpga-mgr.o
-
-# FPGA Manager Drivers
-obj-$(CONFIG_FPGA_MGR_ICE40_SPI) += ice40-spi.o
-obj-$(CONFIG_FPGA_MGR_MACHXO2_SPI) += machxo2-spi.o
+obj-$(CONFIG_FPGA) += fpga-mgr.o
# FPGA Bridge Drivers
-obj-$(CONFIG_FPGA_BRIDGE) += fpga-bridge.o
+obj-$(CONFIG_FPGA_BRIDGE) += fpga-bridge.o
# High Level Interfaces
-obj-$(CONFIG_FPGA_REGION) += fpga-region.o
-obj-$(CONFIG_OF_FPGA_REGION) += of-fpga-region.o
+obj-$(CONFIG_FPGA_REGION) += fpga-region.o
+obj-$(CONFIG_OF_FPGA_REGION) += of-fpga-region.o
obj-$(CONFIG_FPGA_ALTERA) += altera/
obj-$(CONFIG_FPGA_DFL) += dfl/
+obj-$(CONFIG_FPGA_LATTICE) += lattice/
obj-$(CONFIG_FPGA_XILINX) += xilinx/
new file mode 100644
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config FPGA_LATTICE
+ bool "Lattice FPGAs"
+ default y
+ help
+ If you have a lattice fpga, say Y.
+
+ Note that the answer to this question doesn't directly affect the
+ kernel: saying N will just cause the configurator to skip all
+ the questions about lattice fpgas. If you say Y, you will be asked
+ for your specific device in the following questions.
+
+if FPGA_LATTICE
+
+config FPGA_MGR_ICE40_SPI
+ tristate "Lattice iCE40 SPI"
+ depends on OF && SPI
+ help
+ FPGA manager driver support for Lattice iCE40 FPGAs over SPI.
+
+config FPGA_MGR_MACHXO2_SPI
+ tristate "Lattice MachXO2 SPI"
+ depends on SPI
+ help
+ FPGA manager driver support for Lattice MachXO2 configuration
+ over slave SPI interface.
+
+endif #FPGA_LATTICE
new file mode 100644
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+obj-$(CONFIG_FPGA_MGR_ICE40_SPI) += ice40-spi.o
+obj-$(CONFIG_FPGA_MGR_MACHXO2_SPI) += machxo2-spi.o
similarity index 100%
rename from drivers/fpga/ice40-spi.c
rename to drivers/fpga/lattice/ice40-spi.c
similarity index 100%
rename from drivers/fpga/machxo2-spi.c
rename to drivers/fpga/lattice/machxo2-spi.c