summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-12-04 10:03:29 -0500
committerTom Rini <trini@konsulko.com>2022-12-23 10:07:03 -0500
commitf00f676af6bcae0702efbac45b88c1b8b686d400 (patch)
treeea7961a8c9138089d0dd5780882924b5a7f40765
parent7ee2f977b7913ac7c1eda11051fe7401ab73ab89 (diff)
Convert CONFIG_SYS_FPGA_CHECK_BUSY to Kconfig
This converts the following to Kconfig: CONFIG_SYS_FPGA_CHECK_BUSY Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--drivers/fpga/Kconfig4
-rw-r--r--drivers/fpga/spartan2.c2
-rw-r--r--drivers/fpga/spartan3.c2
-rw-r--r--drivers/fpga/virtex2.c7
4 files changed, 6 insertions, 9 deletions
diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
index 813d6a836d9..11b742eeebf 100644
--- a/drivers/fpga/Kconfig
+++ b/drivers/fpga/Kconfig
@@ -96,6 +96,10 @@ config FPGA_VIRTEX2
Enable Virtex-II FPGA driver for loading in BIT format. This driver
also supports many newer Xilinx FPGA families.
+config SYS_FPGA_CHECK_BUSY
+ bool "Perform busy check during load from FPGA"
+ depends on FPGA_SPARTAN2 || FPGA_SPARTAN3 || FPGA_VIRTEX2
+
config FPGA_ZYNQPL
bool "Enable Xilinx FPGA for Zynq"
depends on ARCH_ZYNQ
diff --git a/drivers/fpga/spartan2.c b/drivers/fpga/spartan2.c
index 57a4532f736..68971d93470 100644
--- a/drivers/fpga/spartan2.c
+++ b/drivers/fpga/spartan2.c
@@ -10,8 +10,6 @@
#include <log.h>
#include <spartan2.h> /* Spartan-II device family */
-#undef CONFIG_SYS_FPGA_CHECK_BUSY
-
/* Note: The assumption is that we cannot possibly run fast enough to
* overrun the device (the Slave Parallel mode can free run at 50MHz).
* If there is a need to operate slower, define CONFIG_FPGA_DELAY in
diff --git a/drivers/fpga/spartan3.c b/drivers/fpga/spartan3.c
index fdec89bb815..1d5073cb59d 100644
--- a/drivers/fpga/spartan3.c
+++ b/drivers/fpga/spartan3.c
@@ -15,8 +15,6 @@
#include <log.h>
#include <spartan3.h> /* Spartan-II device family */
-#undef CONFIG_SYS_FPGA_CHECK_BUSY
-
/* Note: The assumption is that we cannot possibly run fast enough to
* overrun the device (the Slave Parallel mode can free run at 50MHz).
* If there is a need to operate slower, define CONFIG_FPGA_DELAY in
diff --git a/drivers/fpga/virtex2.c b/drivers/fpga/virtex2.c
index 8871deaea6f..ed2a4163f6e 100644
--- a/drivers/fpga/virtex2.c
+++ b/drivers/fpga/virtex2.c
@@ -21,14 +21,11 @@
#include <linux/delay.h>
/*
- * If the SelectMap interface can be overrun by the processor, define
- * CONFIG_SYS_FPGA_CHECK_BUSY and/or CONFIG_FPGA_DELAY in the board
+ * If the SelectMap interface can be overrun by the processor, enable
+ * CONFIG_SYS_FPGA_CHECK_BUSY and/or define CONFIG_FPGA_DELAY in the board
* configuration file and add board-specific support for checking BUSY status.
* By default, assume that the SelectMap interface cannot be overrun.
*/
-#ifndef CONFIG_SYS_FPGA_CHECK_BUSY
-#undef CONFIG_SYS_FPGA_CHECK_BUSY
-#endif
#ifndef CONFIG_FPGA_DELAY
#define CONFIG_FPGA_DELAY()