summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-02-06 08:09:54 -0600
committerTom Rini <[email protected]>2025-02-06 08:09:54 -0600
commitc2e00482d0058908014014b1c703e0eaaf1490d7 (patch)
treedd7fee96b40ca0d97d9ad8d7fff490d1daf611c9 /cmd
parentb3c09eb36529fbb277bec17b35e638f42cb33683 (diff)
parent0f019056b2d23aaa839fab31c016d73009870a23 (diff)
Merge tag 'xilinx-for-v2025.04-rc2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
AMD/Xilinx changes for v2025.04-rc2 fpga: - Cleanup help - Show xilinx only options on Xilinx devices ospi-versal: - Fix alignment issue - Fix cadence_qspi_flash_reset() prototype zynqmp: - Define usb_pgood_delay - Fix bootseq number versal: - Fix mini_ospi configuration versal2: - Enable OPTEE xilinx: - Enable some flashes - Clean up SYS_MALLOC_F_LEN Kconfig - Some binman fixes - DT updates - Enable mkfwumdata compilation - Enable meminfo command - Switch to LWIP and enable HTTPS
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Kconfig35
-rw-r--r--cmd/fpga.c65
2 files changed, 51 insertions, 49 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index e62817bd977..1f9b26928c4 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1178,16 +1178,30 @@ 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 file"
+ default y
+ depends on CMD_FPGA && FPGA_XILINX
+ help
+ Supports loading an FPGA device from a bitstream file (.BIT)
+
+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.
+ Supports loading an FPGA device from a bitstream buffer (.BIN)
+ containing a partial bitstream.
+
+config CMD_FPGA_LOADBP
+ bool "fpga loadbp - load partial bitstream file"
+ depends on CMD_FPGA && FPGA_XILINX
+ help
+ Supports loading an FPGA device from a bitstream file (.BIT)
+ 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.
@@ -1197,16 +1211,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 93f14098ccb..9dc7b63db5d 100644
--- a/cmd/fpga.c
+++ b/cmd/fpga.c
@@ -67,7 +67,8 @@ static int do_fpga_check_params(long *dev, long *fpga_data, size_t *data_size,
}
#if defined(CONFIG_CMD_FPGA_LOAD_SECURE)
-int do_fpga_loads(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
+static int do_fpga_loads(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
size_t data_size = 0;
long fpga_data, dev;
@@ -180,6 +181,7 @@ static int do_fpga_load(struct cmd_tbl *cmdtp, int flag, int argc,
return fpga_load(dev, (void *)fpga_data, data_size, BIT_FULL, 0);
}
+#if defined(CONFIG_CMD_FPGA_LOADB)
static int do_fpga_loadb(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
@@ -194,7 +196,7 @@ static int do_fpga_loadb(struct cmd_tbl *cmdtp, int flag, int argc,
return fpga_loadbitstream(dev, (void *)fpga_data, data_size, BIT_FULL);
}
-
+#endif
#if defined(CONFIG_CMD_FPGA_LOADP)
static int do_fpga_loadp(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
@@ -356,7 +358,9 @@ static struct cmd_tbl fpga_commands[] = {
U_BOOT_CMD_MKENT(info, 1, 1, do_fpga_info, "", ""),
U_BOOT_CMD_MKENT(dump, 3, 1, do_fpga_dump, "", ""),
U_BOOT_CMD_MKENT(load, 3, 1, do_fpga_load, "", ""),
+#if defined(CONFIG_CMD_FPGA_LOADB)
U_BOOT_CMD_MKENT(loadb, 3, 1, do_fpga_loadb, "", ""),
+#endif
#if defined(CONFIG_CMD_FPGA_LOADP)
U_BOOT_CMD_MKENT(loadp, 3, 1, do_fpga_loadp, "", ""),
#endif
@@ -408,49 +412,40 @@ U_BOOT_CMD(fpga, 9, 1, do_fpga_wrapper,
#else
U_BOOT_CMD(fpga, 6, 1, do_fpga_wrapper,
#endif
- "loadable FPGA image support",
- "[operation type] [device number] [image address] [image size]\n"
- "fpga operations:\n"
- " dump\t[dev] [address] [size]\tLoad device to memory buffer\n"
- " info\t[dev]\t\t\tlist known device information\n"
- " load\t[dev] [address] [size]\tLoad device from memory buffer\n"
+ "loadable FPGA image support",
+ "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 loadb <dev> <address> <size> Load device from bitstream buffer\n"
+#endif
#if defined(CONFIG_CMD_FPGA_LOADP)
- " loadp\t[dev] [address] [size]\t"
- "Load device from memory buffer with partial bitstream\n"
+ "fpga loadp <dev> <address> <size> Load device from memory buffer\n"
+ " with partial bitstream\n"
#endif
- " loadb\t[dev] [address] [size]\t"
- "Load device from bitstream buffer (Xilinx only)\n"
#if defined(CONFIG_CMD_FPGA_LOADBP)
- " loadbp\t[dev] [address] [size]\t"
- "Load device from bitstream buffer with partial bitstream"
- "(Xilinx only)\n"
+ "fpga loadbp <dev> <address> <size> Load device from bitstream buffer\n"
+ " with partial bitstream\n"
#endif
#if defined(CONFIG_CMD_FPGA_LOADFS)
- "Load device from filesystem (FAT by default) (Xilinx only)\n"
- " loadfs [dev] [address] [image size] [blocksize] <interface>\n"
- " [<dev[:part]>] <filename>\n"
+ "fpga loadfs <dev> <address> <size> <blocksize> <interface> [<dev[:part]>] <filename>\n"
+ " Load device from filesystem (FAT by default)\n"
#endif
#if defined(CONFIG_CMD_FPGA_LOADMK)
- " loadmk [dev] [address]\tLoad device generated with mkimage"
+ "fpga loadmk <dev> <address> Load device generated with mkimage\n"
#if defined(CONFIG_FIT)
- "\n"
- "\tFor loadmk operating on FIT format uImage address must include\n"
- "\tsubimage unit name in the form of addr:<subimg_uname>"
+ " NOTE: loadmk operating on FIT must include subimage unit\n"
+ " name in the form of addr:<subimg_uname>\n"
#endif
#endif
#if defined(CONFIG_CMD_FPGA_LOAD_SECURE)
- "Load encrypted bitstream (Xilinx only)\n"
- " loads [dev] [address] [size] [auth-OCM-0/DDR-1/noauth-2]\n"
- " [enc-devkey(0)/userkey(1)/nenc(2) [Userkey address]\n"
- "Loads the secure bistreams(authenticated/encrypted/both\n"
- "authenticated and encrypted) of [size] from [address].\n"
- "The auth-OCM/DDR flag specifies to perform authentication\n"
- "in OCM or in DDR. 0 for OCM, 1 for DDR, 2 for no authentication.\n"
- "The enc flag specifies which key to be used for decryption\n"
- "0-device key, 1-user key, 2-no encryption.\n"
- "The optional Userkey address specifies from which address key\n"
- "has to be used for decryption if user key is selected.\n"
- "NOTE: the secure bitstream has to be created using Xilinx\n"
- "bootgen tool only.\n"
+ "fpga loads <dev> <address> <size> <authflag> <encflag> [Userkey address]\n"
+ " Load device from memory buffer with secure bistream\n"
+ " (authenticated/encrypted/both)\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"
+ " -Userkey address: address where user key is stored\n"
+ " NOTE: secure bitstream has to be created using Xilinx bootgen tool\n"
#endif
);