mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
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 <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user