]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fpga: Migrate CONFIG_MAX_FPGA_DEVICES to Kconfig
authorTom Rini <trini@konsulko.com>
Tue, 10 Jan 2023 16:19:37 +0000 (11:19 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 20 Jan 2023 17:27:06 +0000 (12:27 -0500)
This is always defined to 5, so use that as the default.

Cc: Michal Simek <michal.simek@amd.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
drivers/fpga/Kconfig
drivers/fpga/fpga.c
include/fpga.h

index 11b742eeebfe8e267c805e8d586f84341091f75c..4113de230cd966676e8c4a4accc51fd039cc952f 100644 (file)
@@ -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
index 4db5c0a91e98f5ff76fd433580fef7d8e3b8aefc..7f6b6bc73a1f0d2e3250d869863ef4338de9a9e0 100644 (file)
 #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];
index a4e16401da7232c6c0ec15805ac65c9be1c91cd4..ed688cc0fa3bf4a4ca3310760afc01d0e9d3e50e 100644 (file)
@@ -9,10 +9,6 @@
 #ifndef _FPGA_H_
 #define _FPGA_H_
 
-#ifndef CONFIG_MAX_FPGA_DEVICES
-#define CONFIG_MAX_FPGA_DEVICES                5
-#endif
-
 /* fpga_xxxx function return value definitions */
 #define FPGA_SUCCESS           0
 #define FPGA_FAIL              1