[PATCH] board: freescale: lx216x : increase fdt blob size

2021-09-17 Thread Wasim Khan
From: Wasim Khan 

Increase fdt blob size for lx2160 and lx2162 series
to fix below errors/warnings during device tree fixup.

Unable to update property /soc/spi@210:status, err=FDT_ERR_NOSPACE
Unable to update property /soc/spi@211:status, err=FDT_ERR_NOSPACE
Unable to update property /soc/spi@212:status, err=FDT_ERR_NOSPACE
WARNING: could not set reg FDT_ERR_NOSPACE.
WARNING unable to set iommus: FDT_ERR_NOSPACE

Signed-off-by: Wasim Khan 
---
 board/freescale/lx2160a/lx2160a.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/board/freescale/lx2160a/lx2160a.c 
b/board/freescale/lx2160a/lx2160a.c
index f505e82fb9..d03168d6a2 100644
--- a/board/freescale/lx2160a/lx2160a.c
+++ b/board/freescale/lx2160a/lx2160a.c
@@ -828,10 +828,18 @@ int ft_board_setup(void *blob, struct bd_info *bd)
u64 mc_memory_base = 0;
u64 mc_memory_size = 0;
u16 total_memory_banks;
+   int err;
 #if CONFIG_IS_ENABLED(TARGET_LX2160ARDB)
u8 board_rev;
 #endif
 
+   err = fdt_increase_size(blob, 512);
+   if (err) {
+   printf("%s fdt_increase_size: err=%s\n", __func__,
+  fdt_strerror(err));
+   return 1;
+   }
+
ft_cpu_setup(blob, bd);
 
fdt_fixup_mc_ddr(&mc_memory_base, &mc_memory_size);
-- 
2.25.1



Re: [PATCH] board: freescale: lx216x : increase fdt blob size

2021-09-20 Thread Tom Rini
On Fri, Sep 17, 2021 at 02:18:28PM +0200, Wasim Khan wrote:

> From: Wasim Khan 
> 
> Increase fdt blob size for lx2160 and lx2162 series
> to fix below errors/warnings during device tree fixup.
> 
> Unable to update property /soc/spi@210:status, err=FDT_ERR_NOSPACE
> Unable to update property /soc/spi@211:status, err=FDT_ERR_NOSPACE
> Unable to update property /soc/spi@212:status, err=FDT_ERR_NOSPACE
> WARNING: could not set reg FDT_ERR_NOSPACE.
> WARNING unable to set iommus: FDT_ERR_NOSPACE
> 
> Signed-off-by: Wasim Khan 
> ---
>  board/freescale/lx2160a/lx2160a.c | 8 
>  1 file changed, 8 insertions(+)
> 
> diff --git a/board/freescale/lx2160a/lx2160a.c 
> b/board/freescale/lx2160a/lx2160a.c
> index f505e82fb9..d03168d6a2 100644
> --- a/board/freescale/lx2160a/lx2160a.c
> +++ b/board/freescale/lx2160a/lx2160a.c
> @@ -828,10 +828,18 @@ int ft_board_setup(void *blob, struct bd_info *bd)
>   u64 mc_memory_base = 0;
>   u64 mc_memory_size = 0;
>   u16 total_memory_banks;
> + int err;
>  #if CONFIG_IS_ENABLED(TARGET_LX2160ARDB)
>   u8 board_rev;
>  #endif
>  
> + err = fdt_increase_size(blob, 512);
> + if (err) {
> + printf("%s fdt_increase_size: err=%s\n", __func__,
> +fdt_strerror(err));
> + return 1;
> + }
> +
>   ft_cpu_setup(blob, bd);

This should return the error we got from fdt_increase_size rather than
1.

-- 
Tom


signature.asc
Description: PGP signature