summaryrefslogtreecommitdiff
path: root/drivers/fpga
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-01-20 14:21:38 -0500
committerTom Rini <trini@konsulko.com>2023-01-20 14:21:38 -0500
commit0b9b01517f0b1398ec27dbb47faf3645b719e02c (patch)
treefac11441ba4056e75d3b59811da3b0a91d1cfcf5 /drivers/fpga
parent8bd3c0a7e17ee17c771cabc0e548a1a436ac021d (diff)
parent6333acb961b6fcaa60c6e5b623d676b332481cfa (diff)
Merge branch '2023-01-20-finish-CONFIG-migration-work'
- Merge in the final batch of CONFIG to Kconfig/CFG migration work. This includes a fix for a number of ns16550 or similar UARTs due to a migration bug. We also pull in a revert for enabling CONFIG_VIDEO on tools-only_defconfig.
Diffstat (limited to 'drivers/fpga')
-rw-r--r--drivers/fpga/Kconfig5
-rw-r--r--drivers/fpga/fpga.c5
-rw-r--r--drivers/fpga/virtex2.c8
-rw-r--r--drivers/fpga/zynqpl.c6
4 files changed, 12 insertions, 12 deletions
diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
index 11b742eeebf..4113de230cd 100644
--- a/drivers/fpga/Kconfig
+++ b/drivers/fpga/Kconfig
@@ -153,4 +153,9 @@ config SANDBOX_FPGA
This is a driver model based FPGA driver for sandbox.
Currently it is a stub only, as there are no usable uclass methods yet.
+config MAX_FPGA_DEVICES
+ int "Maximum number of FPGA devices"
+ depends on FPGA
+ default 5
+
endmenu
diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c
index 4db5c0a91e9..7f6b6bc73a1 100644
--- a/drivers/fpga/fpga.c
+++ b/drivers/fpga/fpga.c
@@ -13,11 +13,6 @@
#include <lattice.h>
#include <dm/device_compat.h>
-/* Local definitions */
-#ifndef CONFIG_MAX_FPGA_DEVICES
-#define CONFIG_MAX_FPGA_DEVICES 5
-#endif
-
/* Local static data */
static int next_desc = FPGA_INVALID_DEVICE;
static fpga_desc desc_table[CONFIG_MAX_FPGA_DEVICES];
diff --git a/drivers/fpga/virtex2.c b/drivers/fpga/virtex2.c
index fc99a5f4831..3ded27f9b3f 100644
--- a/drivers/fpga/virtex2.c
+++ b/drivers/fpga/virtex2.c
@@ -34,8 +34,8 @@
/*
* Check for errors during configuration by default
*/
-#ifndef CONFIG_SYS_FPGA_CHECK_ERROR
-#define CONFIG_SYS_FPGA_CHECK_ERROR
+#ifndef CFG_SYS_FPGA_CHECK_ERROR
+#define CFG_SYS_FPGA_CHECK_ERROR
#endif
/*
@@ -323,7 +323,7 @@ static int virtex2_ssm_load(xilinx_desc *desc, const void *buf, size_t bsize)
break;
}
-#ifdef CONFIG_SYS_FPGA_CHECK_ERROR
+#ifdef CFG_SYS_FPGA_CHECK_ERROR
if ((*fn->init)(cookie)) {
printf("\n%s:%d: ** Error: INIT asserted during configuration\n",
__func__, __LINE__);
@@ -458,7 +458,7 @@ static int virtex2_ss_load(xilinx_desc *desc, const void *buf, size_t bsize)
break;
}
-#ifdef CONFIG_SYS_FPGA_CHECK_ERROR
+#ifdef CFG_SYS_FPGA_CHECK_ERROR
if ((*fn->init)(cookie)) {
printf("\n%s:%d: ** Error: INIT asserted during configuration\n",
__func__, __LINE__);
diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c
index 53dd780a6ca..a2e3b305fa4 100644
--- a/drivers/fpga/zynqpl.c
+++ b/drivers/fpga/zynqpl.c
@@ -40,8 +40,8 @@
#define CFG_SYS_FPGA_WAIT CONFIG_SYS_HZ/100 /* 10 ms */
#endif
-#ifndef CONFIG_SYS_FPGA_PROG_TIME
-#define CONFIG_SYS_FPGA_PROG_TIME (CONFIG_SYS_HZ * 4) /* 4 s */
+#ifndef CFG_SYS_FPGA_PROG_TIME
+#define CFG_SYS_FPGA_PROG_TIME (CONFIG_SYS_HZ * 4) /* 4 s */
#endif
#define DUMMY_WORD 0xffffffff
@@ -181,7 +181,7 @@ static int zynq_dma_transfer(u32 srcbuf, u32 srclen, u32 dstbuf, u32 dstlen)
return FPGA_FAIL;
}
- if (get_timer(ts) > CONFIG_SYS_FPGA_PROG_TIME) {
+ if (get_timer(ts) > CFG_SYS_FPGA_PROG_TIME) {
printf("%s: Timeout wait for DMA to complete\n",
__func__);
return FPGA_FAIL;