* [PATCH] board: stm32mp1: no MTD partitions fixup for serial boot
@ 2020-10-15 12:52 Patrick Delaunay
2020-10-21 11:45 ` [Uboot-stm32] " Patrice CHOTARD
2020-11-25 9:58 ` Patrick DELAUNAY
0 siblings, 2 replies; 3+ messages in thread
From: Patrick Delaunay @ 2020-10-15 12:52 UTC (permalink / raw)
To: u-boot
Remove the update of the MTD partitions in kernel device tree
for serial boot (USB / UART), and the kernel will use the MTD
partitions define in the loaded DTB because U-Boot can't known the
expected flash layout in this case.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
board/st/stm32mp1/stm32mp1.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 03a19af930..8a3ce0a6f5 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -848,9 +848,14 @@ int ft_board_setup(void *blob, struct bd_info *bd)
{ "st,stm32mp15-fmc2", MTD_DEV_TYPE_NAND, },
{ "st,stm32mp1-fmc2-nfc", MTD_DEV_TYPE_NAND, },
};
-
- if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS))
- fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
+ char *boot_device;
+
+ /* Check the boot-source and don't update MTD for serial or usb boot */
+ boot_device = env_get("boot_device");
+ if (!boot_device ||
+ (strcmp(boot_device, "serial") && strcmp(boot_device, "usb")))
+ if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS))
+ fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
return 0;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Uboot-stm32] [PATCH] board: stm32mp1: no MTD partitions fixup for serial boot
2020-10-15 12:52 [PATCH] board: stm32mp1: no MTD partitions fixup for serial boot Patrick Delaunay
@ 2020-10-21 11:45 ` Patrice CHOTARD
2020-11-25 9:58 ` Patrick DELAUNAY
1 sibling, 0 replies; 3+ messages in thread
From: Patrice CHOTARD @ 2020-10-21 11:45 UTC (permalink / raw)
To: u-boot
Hi Patrick
On 10/15/20 2:52 PM, Patrick Delaunay wrote:
> Remove the update of the MTD partitions in kernel device tree
> for serial boot (USB / UART), and the kernel will use the MTD
> partitions define in the loaded DTB because U-Boot can't known the
> expected flash layout in this case.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> board/st/stm32mp1/stm32mp1.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
> index 03a19af930..8a3ce0a6f5 100644
> --- a/board/st/stm32mp1/stm32mp1.c
> +++ b/board/st/stm32mp1/stm32mp1.c
> @@ -848,9 +848,14 @@ int ft_board_setup(void *blob, struct bd_info *bd)
> { "st,stm32mp15-fmc2", MTD_DEV_TYPE_NAND, },
> { "st,stm32mp1-fmc2-nfc", MTD_DEV_TYPE_NAND, },
> };
> -
> - if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS))
> - fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
> + char *boot_device;
> +
> + /* Check the boot-source and don't update MTD for serial or usb boot */
> + boot_device = env_get("boot_device");
> + if (!boot_device ||
> + (strcmp(boot_device, "serial") && strcmp(boot_device, "usb")))
> + if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS))
> + fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
>
> return 0;
> }
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] board: stm32mp1: no MTD partitions fixup for serial boot
2020-10-15 12:52 [PATCH] board: stm32mp1: no MTD partitions fixup for serial boot Patrick Delaunay
2020-10-21 11:45 ` [Uboot-stm32] " Patrice CHOTARD
@ 2020-11-25 9:58 ` Patrick DELAUNAY
1 sibling, 0 replies; 3+ messages in thread
From: Patrick DELAUNAY @ 2020-11-25 9:58 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: jeudi 15 octobre 2020 14:53
>
> Remove the update of the MTD partitions in kernel device tree for serial boot
> (USB / UART), and the kernel will use the MTD partitions define in the loaded DTB
> because U-Boot can't known the expected flash layout in this case.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> board/st/stm32mp1/stm32mp1.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
Applied to u-boot-stm/master, thanks!
Regards
Patrick
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-25 9:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 12:52 [PATCH] board: stm32mp1: no MTD partitions fixup for serial boot Patrick Delaunay
2020-10-21 11:45 ` [Uboot-stm32] " Patrice CHOTARD
2020-11-25 9:58 ` Patrick DELAUNAY
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.