diff options
author | Simon Glass <sjg@chromium.org> | 2023-02-13 08:56:32 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-02-14 09:42:14 -0700 |
commit | c74e03417bdcb2930fa027e78cc8cebed384a975 (patch) | |
tree | 1ae64a0916c7edec68aa3e188e82e5c646d49519 /drivers/core/ofnode.c | |
parent | 7703efbc9959e3c468e5c12744168bc5f9326cef (diff) |
dm: Add support for handling old u-boot,dm- tags
Add a CONFIG option to deal with this automatically, printing a warning
when U-Boot starts up. This can be useful if the device tree comes from
another project.
We will maintain this through the 2023.07 release, providing 6 months
for people to notice.
Signed-off-by: Simon Glass <sjg@chromium.org>
Version 4:
Acked-by: Michal Simek <michal.simek@amd.com>
Diffstat (limited to 'drivers/core/ofnode.c')
-rw-r--r-- | drivers/core/ofnode.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index d08578e9c4f..5fdac2b6638 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -1330,6 +1330,18 @@ bool ofnode_pre_reloc(ofnode node) ofnode_read_bool(node, "u-boot,dm-tpl")) return true; + if (IS_ENABLED(CONFIG_OF_TAG_MIGRATE)) { + /* detect and handle old tags */ + if (ofnode_read_bool(node, "u-boot,dm-pre-reloc") || + ofnode_read_bool(node, "u-boot,dm-pre-proper") || + ofnode_read_bool(node, "u-boot,dm-spl") || + ofnode_read_bool(node, "u-boot,dm-tpl") || + ofnode_read_bool(node, "u-boot,dm-vpl")) { + gd->flags |= GD_FLG_OF_TAG_MIGRATE; + return true; + } + } + return false; #endif } |