summaryrefslogtreecommitdiff
path: root/drivers/dfu/dfu.c
diff options
context:
space:
mode:
authorCaleb Connolly <caleb.connolly@linaro.org>2024-10-12 15:57:17 +0200
committerCaleb Connolly <caleb.connolly@linaro.org>2024-11-20 17:57:58 +0100
commitef14c347db4ae62f964bcf36805563efe1104754 (patch)
treebdede09c7a42f0504ba75f99c4a4cc0ca7107474 /drivers/dfu/dfu.c
parent0ce0b77243dffc23068c744628f4564d3f396b62 (diff)
dfu: add scsi backend
This is extremely similar to the MMC backend, but there are some notable differences. Works with a DFU string like scsi 4=u-boot-bin part 11 Where "4" is the SCSI dev number (sequential LUN across all SCSI devices) and "11" is the partition number. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Acked-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Diffstat (limited to 'drivers/dfu/dfu.c')
-rw-r--r--drivers/dfu/dfu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index 7a4d7ba2a7f..756569217bb 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -564,6 +564,9 @@ static int dfu_fill_entity(struct dfu_entity *dfu, char *s, int alt,
} else if (strcmp(interface, "virt") == 0) {
if (dfu_fill_entity_virt(dfu, devstr, argv, argc))
return -1;
+ } else if (strcmp(interface, "scsi") == 0) {
+ if (dfu_fill_entity_scsi(dfu, devstr, argv, argc))
+ return -1;
} else {
printf("%s: Device %s not (yet) supported!\n",
__func__, interface);
@@ -660,7 +663,7 @@ int dfu_config_entities(char *env, char *interface, char *devstr)
const char *dfu_get_dev_type(enum dfu_device_type t)
{
const char *const dev_t[] = {NULL, "eMMC", "OneNAND", "NAND", "RAM",
- "SF", "MTD", "VIRT"};
+ "SF", "MTD", "VIRT", "SCSI"};
return dev_t[t];
}