Message ID | 20220415144321.1.Ic7fcf7558ba1c08e031b54acd7b9f3544addb1d8@changeid |
---|---|
State | Accepted |
Commit | 6a69eaf6f43840b05d7093c2728b2b6b011c31de |
Delegated to: | Patrice Chotard |
Headers | show |
Series | ARM: stm32mp: skip ft_system_setup when the soc node is absent | expand |
On 4/15/22 14:43, Patrick Delaunay wrote: > The function ft_system_setup should don't return an error when the s/should don't/shouldn't with this fix you can had my reviewed-by Thanks > /soc node is absent in the provided device tree but just skip the > updates. > > This patch solves an issue when the U-Boot pytest is executed on board. > > Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> > --- > > arch/arm/mach-stm32mp/fdt.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/arm/mach-stm32mp/fdt.c b/arch/arm/mach-stm32mp/fdt.c > index 91330a68a4..b1a4b76566 100644 > --- a/arch/arm/mach-stm32mp/fdt.c > +++ b/arch/arm/mach-stm32mp/fdt.c > @@ -260,6 +260,9 @@ int ft_system_setup(void *blob, struct bd_info *bd) > char name[SOC_NAME_SIZE]; > > soc = fdt_path_offset(blob, "/soc"); > + /* when absent, nothing to do */ > + if (soc == -FDT_ERR_NOTFOUND) > + return 0; > if (soc < 0) > return soc; >
I will fix the typo when applying this patch to u-boot-stm32 branch Patrice On 4/22/22 09:47, Patrice CHOTARD wrote: > > > On 4/15/22 14:43, Patrick Delaunay wrote: >> The function ft_system_setup should don't return an error when the > > s/should don't/shouldn't > with this fix you can had my reviewed-by > > Thanks > >> /soc node is absent in the provided device tree but just skip the >> updates. >> >> This patch solves an issue when the U-Boot pytest is executed on board. >> >> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> >> --- >> >> arch/arm/mach-stm32mp/fdt.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/arch/arm/mach-stm32mp/fdt.c b/arch/arm/mach-stm32mp/fdt.c >> index 91330a68a4..b1a4b76566 100644 >> --- a/arch/arm/mach-stm32mp/fdt.c >> +++ b/arch/arm/mach-stm32mp/fdt.c >> @@ -260,6 +260,9 @@ int ft_system_setup(void *blob, struct bd_info *bd) >> char name[SOC_NAME_SIZE]; >> >> soc = fdt_path_offset(blob, "/soc"); >> + /* when absent, nothing to do */ >> + if (soc == -FDT_ERR_NOTFOUND) >> + return 0; >> if (soc < 0) >> return soc; >> >
On 5/10/22 09:38, Patrice CHOTARD wrote: > I will fix the typo when applying this patch to u-boot-stm32 branch > > Patrice > > On 4/22/22 09:47, Patrice CHOTARD wrote: >> >> >> On 4/15/22 14:43, Patrick Delaunay wrote: >>> The function ft_system_setup should don't return an error when the >> >> s/should don't/shouldn't >> with this fix you can had my reviewed-by >> >> Thanks >> >>> /soc node is absent in the provided device tree but just skip the >>> updates. >>> >>> This patch solves an issue when the U-Boot pytest is executed on board. >>> >>> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> >>> --- >>> >>> arch/arm/mach-stm32mp/fdt.c | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/arch/arm/mach-stm32mp/fdt.c b/arch/arm/mach-stm32mp/fdt.c >>> index 91330a68a4..b1a4b76566 100644 >>> --- a/arch/arm/mach-stm32mp/fdt.c >>> +++ b/arch/arm/mach-stm32mp/fdt.c >>> @@ -260,6 +260,9 @@ int ft_system_setup(void *blob, struct bd_info *bd) >>> char name[SOC_NAME_SIZE]; >>> >>> soc = fdt_path_offset(blob, "/soc"); >>> + /* when absent, nothing to do */ >>> + if (soc == -FDT_ERR_NOTFOUND) >>> + return 0; >>> if (soc < 0) >>> return soc; >>> >> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Thanks Patrice
diff --git a/arch/arm/mach-stm32mp/fdt.c b/arch/arm/mach-stm32mp/fdt.c index 91330a68a4..b1a4b76566 100644 --- a/arch/arm/mach-stm32mp/fdt.c +++ b/arch/arm/mach-stm32mp/fdt.c @@ -260,6 +260,9 @@ int ft_system_setup(void *blob, struct bd_info *bd) char name[SOC_NAME_SIZE]; soc = fdt_path_offset(blob, "/soc"); + /* when absent, nothing to do */ + if (soc == -FDT_ERR_NOTFOUND) + return 0; if (soc < 0) return soc;
The function ft_system_setup should don't return an error when the /soc node is absent in the provided device tree but just skip the updates. This patch solves an issue when the U-Boot pytest is executed on board. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> --- arch/arm/mach-stm32mp/fdt.c | 3 +++ 1 file changed, 3 insertions(+)