Skip to contentSkip to conversation

fpga: Convert some options to Kconfig

PATCH Applied Alexander Dahl 2 participants 4 messages Jul 21, 2022 – Jul 26, 2022 FPGA manager framework

lore
Share & tools
lore
#0 lore raw

v3 cover fpga: Convert some options to Kconfig

Hei hei,

tried to work on the feedback I got the best I could.

Greets
Alex

v2 -> v3:
- reworded commit messages
- added kconfig help text for SYS_FPGA_CHECK_CTRLC
- removed hardcoded def/undef from drivers

(implicit) v1 -> v2:
- dropped patch 3, same kconfig symbol addressed with commit

    60d45642fe0673514aced37e6cc95d4f0fe02a19 ("fpga: Remove
    CONFIG_FPGA_COUNT")
Cc Wolfgang Wegner <[email protected]>
Cc Michal Simek <[email protected]>
Cc Tom Rini <[email protected]>

Alexander Dahl (2):
fpga: Convert SYS_FPGA_CHECK_CTRLC to Kconfig
fpga: Convert SYS_FPGA_PROG_FEEDBACK to Kconfig

 README                           |  7 -------
 configs/astro_mcf5373l_defconfig |  1 +
 drivers/fpga/Kconfig             | 13 +++++++++++++
 drivers/fpga/spartan2.c          |  1 -
 drivers/fpga/virtex2.c           | 11 -----------
 include/configs/astro_mcf5373l.h |  1 -
 scripts/config_whitelist.txt     |  1 -
 7 files changed, 14 insertions(+), 21 deletions(-)

base-commit: 88d931a71052fc8fb7b48126ae09aa875745d5ec

Signature · 1 line
2.30.2
#1 lore raw

PATCH v3 1/2 fpga: Convert SYS_FPGA_CHECK_CTRLC to Kconfig

After commit 8cca60a2cbf2 ("Kconfig: Remove some symbols from the whitelist") downstream builds failed for boards setting this in include/configs/…

---
 README                 | 3 ---
 drivers/fpga/Kconfig   | 6 ++++++
 drivers/fpga/virtex2.c | 7 -------
 3 files changed, 6 insertions(+), 10 deletions(-)
README +0 -3
index ff0df3797d..8c31e5c0e3 100644
@@ -1346,9 +1346,6 @@ The following options need to be configured:
 		If defined, a function that provides delays in the FPGA
 		configuration driver.
 
-		CONFIG_SYS_FPGA_CHECK_CTRLC
-		Allow Control-C to interrupt FPGA configuration
-
 		CONFIG_SYS_FPGA_CHECK_ERROR
 
 		Check for configuration errors during FPGA bitfile
drivers/fpga/Kconfig +6 -0
index 76719517f5..78d9588e4b 100644
@@ -91,4 +91,10 @@ config FPGA_ZYNQPL
 	  Enable FPGA driver for loading bitstream in BIT and BIN format
 	  on Xilinx Zynq devices.
 
+config SYS_FPGA_CHECK_CTRLC
+	bool "Allow Control-C to interrupt FPGA configuration"
+	depends on FPGA
+	help
+	  User can interrupt FPGA configuration by pressing CTRL+C.
+
 endmenu
drivers/fpga/virtex2.c +0 -7
index b3e0537bab..0fd2290e3d 100644
@@ -45,13 +45,6 @@
 #define CONFIG_SYS_FPGA_PROG_FEEDBACK
 #endif
 
-/*
- * Don't allow config cycle to be interrupted
- */
-#ifndef CONFIG_SYS_FPGA_CHECK_CTRLC
-#undef CONFIG_SYS_FPGA_CHECK_CTRLC
-#endif
-
 /*
  * Check for errors during configuration by default
  */
Signature · 1 line
2.30.2
#2 lore raw

PATCH v3 2/2 fpga: Convert SYS_FPGA_PROG_FEEDBACK to Kconfig

In reply to Alexander Dahl

This converts the following to Kconfig: SYS_FPGA_PROG_FEEDBACK

---
 README                           | 4 ----
 configs/astro_mcf5373l_defconfig | 1 +
 drivers/fpga/Kconfig             | 7 +++++++
 drivers/fpga/spartan2.c          | 1 -
 drivers/fpga/virtex2.c           | 4 ----
 include/configs/astro_mcf5373l.h | 1 -
 scripts/config_whitelist.txt     | 1 -
 7 files changed, 8 insertions(+), 11 deletions(-)
README +0 -4
index 8c31e5c0e3..2c4bde0b32 100644
@@ -1330,10 +1330,6 @@ The following options need to be configured:
 		Enables support for FPGA family.
 		(SPARTAN2, SPARTAN3, VIRTEX2, CYCLONE2, ACEX1K, ACEX)
 
-		CONFIG_SYS_FPGA_PROG_FEEDBACK
-
-		Enable printing of hash marks during FPGA configuration.
-
 		CONFIG_SYS_FPGA_CHECK_BUSY
 
 		Enable checks on FPGA configuration interface busy
configs/astro_mcf5373l_defconfig +1 -0
index 3a44c7e8ec..9f5cb8702c 100644
@@ -33,6 +33,7 @@ CONFIG_FPGA_ALTERA=y
 CONFIG_FPGA_CYCLON2=y
 CONFIG_FPGA_XILINX=y
 CONFIG_FPGA_SPARTAN3=y
+CONFIG_SYS_FPGA_PROG_FEEDBACK=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_FSL=y
 CONFIG_SYS_FSL_I2C_OFFSET=0x58000
drivers/fpga/Kconfig +7 -0
index 78d9588e4b..696ea92c6e 100644
@@ -97,4 +97,11 @@ config SYS_FPGA_CHECK_CTRLC
 	help
 	  User can interrupt FPGA configuration by pressing CTRL+C.
 
+config SYS_FPGA_PROG_FEEDBACK
+	bool "Progress output during FPGA configuration"
+	depends on FPGA
+	default y if FPGA_VIRTEX2
+	help
+	  Enable printing of hash marks during FPGA configuration.
+
 endmenu
drivers/fpga/spartan2.c +0 -1
index 3435400e58..fe37752210 100644
@@ -15,7 +15,6 @@
 #endif
 
 #undef CONFIG_SYS_FPGA_CHECK_BUSY
-#undef CONFIG_SYS_FPGA_PROG_FEEDBACK
 
 /* Note: The assumption is that we cannot possibly run fast enough to
  * overrun the device (the Slave Parallel mode can free run at 50MHz).
drivers/fpga/virtex2.c +0 -4
index 0fd2290e3d..2e764bdcd5 100644
@@ -41,10 +41,6 @@
 #define CONFIG_FPGA_DELAY()
 #endif
 
-#ifndef CONFIG_SYS_FPGA_PROG_FEEDBACK
-#define CONFIG_SYS_FPGA_PROG_FEEDBACK
-#endif
-
 /*
  * Check for errors during configuration by default
  */
include/configs/astro_mcf5373l.h +0 -1
index a8265e961a..da4d49741d 100644
@@ -131,7 +131,6 @@
  * it needs non-blocking CFI routines.
  */
 
-#define CONFIG_SYS_FPGA_PROG_FEEDBACK
 #define CONFIG_SYS_FPGA_WAIT		1000
 
 /* End of user parameters to be customized */
scripts/config_whitelist.txt +0 -1
index efc2f3bcf7..fc07c5d257 100644
@@ -743,7 +743,6 @@ CONFIG_SYS_FPGA_FTIM0
 CONFIG_SYS_FPGA_FTIM1
 CONFIG_SYS_FPGA_FTIM2
 CONFIG_SYS_FPGA_FTIM3
-CONFIG_SYS_FPGA_PROG_FEEDBACK
 CONFIG_SYS_FPGA_SIZE
 CONFIG_SYS_FPGA_WAIT
 CONFIG_SYS_FSL_BMAN_ADDR
Signature · 1 line
2.30.2
Applied
#3 lore raw
In reply to Alexander Dahl
Quoted 35 lines · Alexander Dahl

Hei hei,

tried to work on the feedback I got the best I could.

Greets
Alex

v2 -> v3:
- reworded commit messages
- added kconfig help text for SYS_FPGA_CHECK_CTRLC
- removed hardcoded def/undef from drivers

(implicit) v1 -> v2:
- dropped patch 3, same kconfig symbol addressed with commit

     60d45642fe0673514aced37e6cc95d4f0fe02a19 ("fpga: Remove
     CONFIG_FPGA_COUNT")
Cc Wolfgang Wegner <[email protected]>
Cc Michal Simek <[email protected]>
Cc Tom Rini <[email protected]>

Alexander Dahl (2):
fpga: Convert SYS_FPGA_CHECK_CTRLC to Kconfig
fpga: Convert SYS_FPGA_PROG_FEEDBACK to Kconfig

  README                           |  7 -------
  configs/astro_mcf5373l_defconfig |  1 +
  drivers/fpga/Kconfig             | 13 +++++++++++++
  drivers/fpga/spartan2.c          |  1 -
  drivers/fpga/virtex2.c           | 11 -----------
  include/configs/astro_mcf5373l.h |  1 -
  scripts/config_whitelist.txt     |  1 -
  7 files changed, 14 insertions(+), 21 deletions(-)
Quoted 1 line

base-commit: 88d931a71052fc8fb7b48126ae09aa875745d5ec

Applied.
M