diff mbox series

[2/3] mvebu: armada-8k: set fdtfile env from DEFAULT_FDT_FILE

Message ID 20250209-cn9130-board-v1-2-b94ab83e141b@solid-run.com
State Changes Requested
Delegated to: Stefan Roese
Headers show
Series arm: mvebu: add solidrun cn913x based boards | expand

Commit Message

Josua Mayer Feb. 9, 2025, 8:23 p.m. UTC
Developers find themselves with two options for defining the default
device-tree for a platform:

1. CONFIG_DEFAULT_DEVICE_TREE deciding which DT the u-boot build will
   use for itself.
2. CONFIG_DEFAULT_FDT_FILE deciding what should be the name of the
   actual device-tree file, when booting an OS.

Armada 8k config file used option 1 while adding a marvell/ directory
prefix. This causes issues when switching a board to CONFIG_OF_UPSTREAM
where the marvell/ prefix would be added twice.

Update the header file to set fdtfile variable instead from
CONFIG_DEFAULT_FDT_FILE. This allows clear separation between
device-tree for U-Boot and OS.

Signed-off-by: Josua Mayer <josua@solid-run.com>
---
 include/configs/mvebu_armada-8k.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Roese Feb. 27, 2025, 10:39 a.m. UTC | #1
On 09.02.25 21:23, Josua Mayer wrote:
> Developers find themselves with two options for defining the default
> device-tree for a platform:
> 
> 1. CONFIG_DEFAULT_DEVICE_TREE deciding which DT the u-boot build will
>     use for itself.
> 2. CONFIG_DEFAULT_FDT_FILE deciding what should be the name of the
>     actual device-tree file, when booting an OS.
> 
> Armada 8k config file used option 1 while adding a marvell/ directory
> prefix. This causes issues when switching a board to CONFIG_OF_UPSTREAM
> where the marvell/ prefix would be added twice.
> 
> Update the header file to set fdtfile variable instead from
> CONFIG_DEFAULT_FDT_FILE. This allows clear separation between
> device-tree for U-Boot and OS.
> 
> Signed-off-by: Josua Mayer <josua@solid-run.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   include/configs/mvebu_armada-8k.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/configs/mvebu_armada-8k.h b/include/configs/mvebu_armada-8k.h
> index 6fedbe9ee386269533852ecc07667e77b11e83d6..cf2e92cf125576f6033a142b7ea40ccb19c92919 100644
> --- a/include/configs/mvebu_armada-8k.h
> +++ b/include/configs/mvebu_armada-8k.h
> @@ -50,7 +50,7 @@
>   	"fdt_addr_r=0x6f00000\0"	\
>   	"kernel_addr_r=0x7000000\0"	\
>   	"ramdisk_addr_r=0xa000000\0"	\
> -	"fdtfile=marvell/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
> +	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
>   	BOOTENV
>   
>   #endif /* _CONFIG_MVEBU_ARMADA_8K_H */
> 

Viele Grüße,
Stefan Roese
diff mbox series

Patch

diff --git a/include/configs/mvebu_armada-8k.h b/include/configs/mvebu_armada-8k.h
index 6fedbe9ee386269533852ecc07667e77b11e83d6..cf2e92cf125576f6033a142b7ea40ccb19c92919 100644
--- a/include/configs/mvebu_armada-8k.h
+++ b/include/configs/mvebu_armada-8k.h
@@ -50,7 +50,7 @@ 
 	"fdt_addr_r=0x6f00000\0"	\
 	"kernel_addr_r=0x7000000\0"	\
 	"ramdisk_addr_r=0xa000000\0"	\
-	"fdtfile=marvell/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	BOOTENV
 
 #endif /* _CONFIG_MVEBU_ARMADA_8K_H */