fdt: Allow indicating a node is for U-Boot proper only
authorPatrick Delaunay <patrick.delaunay@st.com>
Tue, 21 May 2019 17:19:12 +0000 (19:19 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 10 Jul 2019 22:52:58 +0000 (16:52 -0600)
This add missing parts for previous commit 06f94461a9f4
("fdt: Allow indicating a node is for U-Boot proper only")

At present it is not possible to specify that a node should be used before
relocation (in U-Boot proper) without it also ending up in SPL and TPL
device trees. Add a new "u-boot,dm-pre-proper" boolean property for this.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/core/util.c
drivers/video/video-uclass.c

index 96e47dc..60b939a 100644 (file)
@@ -42,6 +42,8 @@ bool dm_ofnode_pre_reloc(ofnode node)
 #else
        if (ofnode_read_bool(node, "u-boot,dm-pre-reloc"))
                return true;
+       if (ofnode_read_bool(node, "u-boot,dm-pre-proper"))
+               return true;
 
        /*
         * In regular builds individual spl and tpl handling both
index b19bfb4..d4071c0 100644 (file)
@@ -291,7 +291,9 @@ static int video_post_bind(struct udevice *dev)
                return 0;
        size = alloc_fb(dev, &addr);
        if (addr < gd->video_bottom) {
-               /* Device tree node may need the 'u-boot,dm-pre-reloc' tag */
+               /* Device tree node may need the 'u-boot,dm-pre-reloc' or
+                * 'u-boot,dm-pre-proper' tag
+                */
                printf("Video device '%s' cannot allocate frame buffer memory -ensure the device is set up before relocation\n",
                       dev->name);
                return -ENOSPC;