
On 1/17/25 10:28, Ibai Erkiaga wrote:
Remove statements of Xilinx Only from the fpga command information and ensure Kconfig dependencies to FPGA_XILINX are implemented instead.
you are actually doing more than you write. You are also resorting commands which is kind of messy.
Signed-off-by: Ibai Erkiaga ibai.erkiaga-elorza@amd.com
(no changes since v1)
Due to an issue with patman I had to add an empty line on the CONFIG_FPGA_LOADB description
cmd/Kconfig | 32 ++++++++++++++++++++------------ cmd/fpga.c | 9 ++++----- 2 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/cmd/Kconfig b/cmd/Kconfig index 1d7ddb4ed36..31f1df2a67d 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1163,16 +1163,31 @@ config CMD_FPGA help FPGA support.
-config CMD_FPGA_LOADBP
- bool "fpga loadbp - load partial bitstream (Xilinx only)"
+config CMD_FPGA_LOADB
- bool "fpga loadb - load bitstream"
- depends on CMD_FPGA && FPGA_XILINX
- help
Supports loading an FPGA device from a bitstream buffer
.
weird
one newline is enough.
+config CMD_FPGA_LOADP
- bool "fpga loadp - load partial bitstream" depends on CMD_FPGA help Supports loading an FPGA device from a bitstream buffer containing a partial bitstream.
+config CMD_FPGA_LOADBP
- bool "fpga loadbp - load partial bitstream"
- depends on CMD_FPGA && FPGA_XILINX
- help
Supports loading an FPGA device from a bitstream buffer containing
a partial bitstream.
- config CMD_FPGA_LOADFS
- bool "fpga loadfs - load bitstream from FAT filesystem (Xilinx only)"
- depends on CMD_FPGA
- bool "fpga loadfs - load bitstream from FAT filesystem"
- depends on CMD_FPGA && FPGA_XILINX help Supports loading an FPGA device from a FAT filesystem.
@@ -1182,16 +1197,9 @@ config CMD_FPGA_LOADMK help Supports loading an FPGA device from a image generated by mkimage.
-config CMD_FPGA_LOADP
- bool "fpga loadp - load partial bitstream"
- depends on CMD_FPGA
- help
Supports loading an FPGA device from a bitstream buffer containing
a partial bitstream.
- config CMD_FPGA_LOAD_SECURE bool "fpga loads - loads secure bitstreams"
- depends on CMD_FPGA
- depends on CMD_FPGA && FPGA_XILINX select FPGA_LOAD_SECURE help Enables the fpga loads command which is used to load secure
diff --git a/cmd/fpga.c b/cmd/fpga.c index 91ccbee0fef..f46ca040d28 100644 --- a/cmd/fpga.c +++ b/cmd/fpga.c @@ -412,19 +412,18 @@ U_BOOT_CMD(fpga, 6, 1, do_fpga_wrapper, "info [dev] List known device information\n" "fpga dump <dev> <address> <size> Load device to memory buffer\n" "fpga load <dev> <address> <size> Load device from memory buffer\n"
#if defined(CONFIG_CMD_FPGA_LOADP) "fpga loadp <dev> <address> <size> Load device from memory buffer\n" " with partial bitstream\n" #endif"fpga loadb <dev> <address> <size> Load device from bitstream buffer\n"
"fpga loadb <dev> <address> <size> Load device from bitstream buffer\n"
" (Xilinx only)\n"
You are removing Xilinx only but still still no symbol for it is created. It means when this is applied it will be available for other vendors too.
Feel free to create two more patches (in front of this one) 1. resort entries in Kconfig 2. introduce CONFIG_CMD_FPGA_LOADB with also using it around do_fpga_loadb()
#if defined(CONFIG_CMD_FPGA_LOADBP) "fpga loadbp <dev> <address> <size> Load device from bitstream buffer\n"
" with partial bitstream (Xilinx only)\n"
#endif #if defined(CONFIG_CMD_FPGA_LOADFS) "fpga loadfs <dev> <address> <size> <blocksize> <interface> [<dev[:part]>] <filename>\n"" with partial bitstream\n"
" Load device from filesystem (FAT by default) (Xilinx only)\n"
#endif #if defined(CONFIG_CMD_FPGA_LOADMK) "fpga loadmk <dev> <address> Load device generated with mkimage\n"" Load device from filesystem (FAT by default)\n"
@@ -436,7 +435,7 @@ U_BOOT_CMD(fpga, 6, 1, do_fpga_wrapper, #if defined(CONFIG_CMD_FPGA_LOAD_SECURE) "fpga loads <dev> <address> <size> <authflag> <encflag> [Userkey address]\n" " Load device from memory buffer with secure bistream\n"
" (authenticated/encrypted/both)(Xilinx only)\n"
" -authflag: 0 for OCM, 1 for DDR, 2 for no authentication\n" " (specifies where to perform authentication)\n" " -encflag: 0 for device key, 1 for user key, 2 for no encryption\n"" (authenticated/encrypted/both)\n"
M