summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Chotard <[email protected]>2026-02-05 09:50:24 +0100
committerPatrice Chotard <[email protected]>2026-02-24 14:11:59 +0100
commit71433d2771611961c5ccdc4f335bc4d147c3b5d3 (patch)
tree4d996a2d3e8a28f9475ad64fef2d60edede22e0e
parent04dcaadd4392d8b7498e6e80a977e0cd67074558 (diff)
stm32mp: stm32prog: Remove fsbl_nor_detected from stm32prog_data struct
No more need to test if a fsbl partition is present on NOR when booting from serial or USB. Now MTD devices are automatically populated with partition information found in DT. Remove fsbl_nor_detected boolean from stm32prog_data struct and all code using it. Signed-off-by: Patrice Chotard <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c8
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c10
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h1
-rw-r--r--arch/arm/mach-stm32mp/include/mach/stm32prog.h2
4 files changed, 0 insertions, 21 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
index 506ecac2ef0..24503bbe58c 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
@@ -187,11 +187,3 @@ U_BOOT_CMD(stm32prog, 5, 0, do_stm32prog,
" <addr> = address of flashlayout\n"
" <size> = size of flashlayout (optional for image with STM32 header)\n"
);
-
-bool stm32prog_get_fsbl_nor(void)
-{
- if (stm32prog_data)
- return stm32prog_data->fsbl_nor_detected;
-
- return false;
-}
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index 9acbc0689a9..835eaf48dfa 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -1010,7 +1010,6 @@ static int treat_partition_list(struct stm32prog_data *data)
INIT_LIST_HEAD(&data->dev[j].part_list);
}
- data->fsbl_nor_detected = false;
for (i = 0; i < data->part_nb; i++) {
part = &data->part_array[i];
part->alt_id = -1;
@@ -1055,15 +1054,6 @@ static int treat_partition_list(struct stm32prog_data *data)
stm32prog_err("Layout: too many device");
return -EINVAL;
}
- switch (part->target) {
- case STM32PROG_NOR:
- if (!data->fsbl_nor_detected &&
- !strncmp(part->name, "fsbl", 4))
- data->fsbl_nor_detected = true;
- /* fallthrough */
- default:
- break;
- }
part->dev = &data->dev[j];
if (!IS_SELECT(part))
part->dev->full_update = false;
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
index bf184c8a884..929e38700e1 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
@@ -167,7 +167,6 @@ struct stm32prog_data {
struct stm32prog_dev_t dev[STM32PROG_MAX_DEV]; /* array of device */
int part_nb; /* nb of partition */
struct stm32prog_part_t *part_array; /* array of partition */
- bool fsbl_nor_detected;
/* command internal information */
unsigned int phase;
diff --git a/arch/arm/mach-stm32mp/include/mach/stm32prog.h b/arch/arm/mach-stm32mp/include/mach/stm32prog.h
index 23d1adfbad9..c10bff09c84 100644
--- a/arch/arm/mach-stm32mp/include/mach/stm32prog.h
+++ b/arch/arm/mach-stm32mp/include/mach/stm32prog.h
@@ -10,5 +10,3 @@ int stm32prog_write_medium_virt(struct dfu_entity *dfu, u64 offset,
int stm32prog_read_medium_virt(struct dfu_entity *dfu, u64 offset,
void *buf, long *len);
int stm32prog_get_medium_size_virt(struct dfu_entity *dfu, u64 *size);
-
-bool stm32prog_get_fsbl_nor(void);