[PATCH v3 6/8] dm: treewide: Complete migration to new driver model schema

Michal Simek michal.simek at amd.com
Mon Feb 6 13:22:48 CET 2023


Hi Simon,

On 2/1/23 23:54, Simon Glass wrote:
> Update various build and test components to use the new schema.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> 
> (no changes since v1)
> 
>   drivers/core/ofnode.c            | 10 +++++-----
>   drivers/video/video-uclass.c     |  4 ++--
>   dts/Kconfig                      |  2 +-
>   include/dm/device.h              |  2 +-
>   include/dm/ofnode.h              | 10 +++++-----
>   scripts/Makefile.lib             | 12 ++++++------
>   test/dm/test-fdt.c               |  2 +-
>   test/py/tests/test_ofplatdata.py |  8 ++++----
>   tools/binman/binman.rst          |  3 +--
>   tools/dtoc/test_fdt.py           |  8 ++++----
>   10 files changed, 30 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
> index 4d56b1a7675..5249a60639b 100644
> --- a/drivers/core/ofnode.c
> +++ b/drivers/core/ofnode.c
> @@ -1265,22 +1265,22 @@ bool ofnode_pre_reloc(ofnode node)
>   {
>   #if defined(CONFIG_SPL_BUILD) || defined(CONFIG_TPL_BUILD)
>   	/* for SPL and TPL the remaining nodes after the fdtgrep 1st pass
> -	 * had property dm-pre-reloc or u-boot,dm-spl/tpl.
> +	 * had property bootph-all or bootph-pre-sram/bootph-pre-ram.
>   	 * They are removed in final dtb (fdtgrep 2nd pass)
>   	 */
>   	return true;
>   #else
> -	if (ofnode_read_bool(node, "u-boot,dm-pre-reloc"))
> +	if (ofnode_read_bool(node, "bootph-all"))
>   		return true;
> -	if (ofnode_read_bool(node, "u-boot,dm-pre-proper"))
> +	if (ofnode_read_bool(node, "bootph-some-ram"))
>   		return true;
>   
>   	/*
>   	 * In regular builds individual spl and tpl handling both
>   	 * count as handled pre-relocation for later second init.
>   	 */
> -	if (ofnode_read_bool(node, "u-boot,dm-spl") ||
> -	    ofnode_read_bool(node, "u-boot,dm-tpl"))
> +	if (ofnode_read_bool(node, "bootph-pre-ram") ||
> +	    ofnode_read_bool(node, "bootph-pre-sram"))
>   		return true;

Please correct me if I am wrong but this change will likely break all boards 
which didn't migrate to this at this stage. And because targeting early stages 
people will be without console.
I think we should have transition period for 1-2 releases to give people enough 
time to migrate. It means print big warning that they have to migrate their DTS.

Thanks,
Michal




More information about the U-Boot mailing list