All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: stm32mp: skip ft_system_setup when the soc node is absent
@ 2022-04-15 12:43 Patrick Delaunay
  2022-04-22  7:47 ` Patrice CHOTARD
  0 siblings, 1 reply; 4+ messages in thread
From: Patrick Delaunay @ 2022-04-15 12:43 UTC (permalink / raw)
  To: u-boot; +Cc: Patrick Delaunay, Patrice Chotard, Tom Rini, U-Boot STM32

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(+)

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;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: stm32mp: skip ft_system_setup when the soc node is absent
  2022-04-15 12:43 [PATCH] ARM: stm32mp: skip ft_system_setup when the soc node is absent Patrick Delaunay
@ 2022-04-22  7:47 ` Patrice CHOTARD
  2022-05-10  7:38   ` Patrice CHOTARD
  0 siblings, 1 reply; 4+ messages in thread
From: Patrice CHOTARD @ 2022-04-22  7:47 UTC (permalink / raw)
  To: Patrick Delaunay, u-boot; +Cc: Tom Rini, U-Boot STM32



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;
>  


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: stm32mp: skip ft_system_setup when the soc node is absent
  2022-04-22  7:47 ` Patrice CHOTARD
@ 2022-05-10  7:38   ` Patrice CHOTARD
  2022-05-10  7:39     ` Patrice CHOTARD
  0 siblings, 1 reply; 4+ messages in thread
From: Patrice CHOTARD @ 2022-05-10  7:38 UTC (permalink / raw)
  To: Patrick Delaunay, u-boot; +Cc: Tom Rini, U-Boot STM32

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;
>>  
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: stm32mp: skip ft_system_setup when the soc node is absent
  2022-05-10  7:38   ` Patrice CHOTARD
@ 2022-05-10  7:39     ` Patrice CHOTARD
  0 siblings, 0 replies; 4+ messages in thread
From: Patrice CHOTARD @ 2022-05-10  7:39 UTC (permalink / raw)
  To: Patrick Delaunay, u-boot; +Cc: Tom Rini, U-Boot STM32



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-10  7:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-15 12:43 [PATCH] ARM: stm32mp: skip ft_system_setup when the soc node is absent Patrick Delaunay
2022-04-22  7:47 ` Patrice CHOTARD
2022-05-10  7:38   ` Patrice CHOTARD
2022-05-10  7:39     ` Patrice CHOTARD

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.