From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Delaunay Date: Tue, 21 May 2019 19:19:12 +0200 Subject: [U-Boot] [PATCH v3 2/3] fdt: Allow indicating a node is for U-Boot proper only In-Reply-To: <1558459153-14104-1-git-send-email-patrick.delaunay@st.com> References: <1558459153-14104-1-git-send-email-patrick.delaunay@st.com> Message-ID: <1558459153-14104-3-git-send-email-patrick.delaunay@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/util.c | 2 ++ drivers/video/video-uclass.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/core/util.c b/drivers/core/util.c index 96e47dc..60b939a 100644 --- a/drivers/core/util.c +++ b/drivers/core/util.c @@ -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 diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 14aac88..d922e53 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -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; -- 2.7.4