stm32mp: stm32prog: accept device without partition
Subsystems (3)
PATCH 1/1 stm32mp: stm32prog: accept device without partition
When partitions are not available on a device the command stm32prog raises an error but a device can have no partition to check in init_device() and the command need to continue to the next part_id.
This patch correct an issue for ram0 target, when block_dev and mtd are NULL.
For example with the simple flashlayout file:
Opt Part Name Type Device Offset Binary
- 0x01 fsbl Binary none 0x0 tf-a-serialboot.stm32
- 0x03 ssbl Binary none 0x0 u-boot.stm32
P 0x10 kernel System ram0 0xC2000000 uImage.bin
P 0x11 dtb FileSytem ram0 0xC4000000 stm32mp157f-ev1.dtb
---
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c +1 -2
@@ -768,9 +768,8 @@ static int init_device(struct stm32prog_data *data, part_found = true; } +/* no partition for this device */ if (!part_found) { -stm32prog_err ("%s (0x%x): Invalid partition" , - part->name, part->id);pr_debug ("\n" );continue ; }
Signature · 1 line
2.17.1
PATCH 1/1 stm32mp: stm32prog: accept device without partition
Hi Patrick
Quoted 27 lines · Patrick Delaunay
When partitions are not available on a device the command stm32prog raises an error but a device can have no partition to check in
init_device()and the command need to continue to the nextpart_id.This patch correct an issue for ram0 target, when
block_devand mtd are NULL.For example with the simple flashlayout file:
Opt Part Name Type Device Offset Binary
(quoted diff) +0
-2- 0x01 fsbl Binary none 0x0 tf-a-serialboot.stm32 - 0x03 ssbl Binary none 0x0 u-boot.stm32P
0x10kernel System ram00xC2000000uImage.bin
P0x11dtb FileSytem ram00xC4000000stm32mp157f-ev1.dtbFixes ffc405e63b94 ("stm32mp: stm32prog: add upport of partial update")Signed-off-by Patrick Delaunay <[email protected]>---
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c +0
-0
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c static int init_device(struct stm32prog_data *data, · line 775
Quoted 10 lines
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c +1
-2@@ -768,9 +768,8 @@ static int init_device(struct stm32prog_data *data, part_found = true; } +/* no partition for this device */ if (!part_found) { -stm32prog_err ("%s (0x%x): Invalid partition" , - part->name, part->id);pr_debug ("\n" );continue ; }
Thanks
PATCH 1/1 stm32mp: stm32prog: accept device without partition
In reply to Patrick DelaunayHi,
Quoted 18 lines
From: Patrick DELAUNAY <[email protected]>
Sent: jeudi 15 octobre 2020 14:28When partitions are not available on a device the command stm32prog raises an error but a device can have no partition to check in
init_device()and the command need to continue to the nextpart_id.This patch correct an issue for ram0 target, when
block_devand mtd are NULL.For example with the simple flashlayout file:
Opt Part Name Type Device Offset Binary
(quoted diff) +0
-2- 0x01 fsbl Binary none 0x0 tf-a-serialboot.stm32 - 0x03 ssbl Binary none 0x0 u-boot.stm32P
0x10kernel System ram00xC2000000uImage.bin
P0x11dtb FileSytem ram00xC4000000stm32mp157f-
ev1.dtb
Quoted 7 lines
Fixes ffc405e63b94 ("stm32mp: stm32prog: add upport of partial update")Signed-off-by Patrick Delaunay <[email protected]>---
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to u-boot-stm/master, thanks!
Regards
Patrick