[PATCH v3 1/3] arm: mvebu: Espressobin: move FDT fixup into a separate function

Stefan Roese sr at denx.de
Tue Jan 9 16:34:03 CET 2024


Hi Robert,

On 1/9/24 14:16, Robert Marko wrote:
> On Wed, Nov 29, 2023 at 11:11 AM Robert Marko <robert.marko at sartura.hr> wrote:
>>
>> Currently, Esspresobin FDT is being fixed up directly in ft_board_setup()
>> which makes it hard to add support for any other board to be fixed up.
>>
>> So, lets just move the FDT fixup code to a separate function and call it
>> if compatible matches, there should be no functional change.
>>
>> Signed-off-by: Robert Marko <robert.marko at sartura.hr>
>> Reviewed-by: Stefan Roese <sr at denx.de>
> 
> 
> Hi Stefan,
> Since 2024.01 was released, can this series be pulled in now?

It's on my list. I actually already started with some CI build tests.
Hope to get this done by end of this week, before I leave for a
short vacation.

Thanks,
Stefan

> Regards,
> Robert
> 
>>
>> ---
>>   board/Marvell/mvebu_armada-37xx/board.c | 14 +++++++++-----
>>   1 file changed, 9 insertions(+), 5 deletions(-)
>>
>> diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
>> index 04124d8014..1471caa9a6 100644
>> --- a/board/Marvell/mvebu_armada-37xx/board.c
>> +++ b/board/Marvell/mvebu_armada-37xx/board.c
>> @@ -363,18 +363,14 @@ EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
>>   #endif
>>
>>   #ifdef CONFIG_OF_BOARD_SETUP
>> -int ft_board_setup(void *blob, struct bd_info *bd)
>> +static int espressobin_fdt_setup(void *blob)
>>   {
>> -#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
>>          int ret;
>>          int spi_off;
>>          int parts_off;
>>          int part_off;
>>
>>          /* Fill SPI MTD partitions for Linux kernel on Espressobin */
>> -       if (!of_machine_is_compatible("globalscale,espressobin"))
>> -               return 0;
>> -
>>          spi_off = fdt_node_offset_by_compatible(blob, -1, "jedec,spi-nor");
>>          if (spi_off < 0)
>>                  return 0;
>> @@ -459,6 +455,14 @@ int ft_board_setup(void *blob, struct bd_info *bd)
>>                  return 0;
>>          }
>>
>> +       return 0;
>> +}
>> +
>> +int ft_board_setup(void *blob, struct bd_info *bd)
>> +{
>> +#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
>> +       if (of_machine_is_compatible("globalscale,espressobin"))
>> +               return espressobin_fdt_setup(blob);
>>   #endif
>>          return 0;
>>   }
>> --
>> 2.43.0
>>
> 
> 

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list