public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] dm: core: also parse chosen node
@ 2017-08-03 16:46 Rob Clark
  2017-08-03 16:47 ` [U-Boot] [PATCH 2/3] video: simplefb Rob Clark
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Rob Clark @ 2017-08-03 16:46 UTC (permalink / raw)
  To: u-boot

This is the node that would contain, for example, the framebuffer setup
by an earlier stage.

Signed-off-by: Rob Clark <robdclark@gmail.com>
---
 drivers/core/root.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/drivers/core/root.c b/drivers/core/root.c
index d691d6ff94..5e6b2da248 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -266,6 +266,26 @@ static int dm_scan_fdt_node(struct udevice *parent, const void *blob,
 	for (offset = fdt_first_subnode(blob, offset);
 	     offset > 0;
 	     offset = fdt_next_subnode(blob, offset)) {
+		ofnode node = offset_to_ofnode(offset);
+
+		/* "chosen" node isn't a device itself but may contain some: */
+		if (strcmp(ofnode_get_name(node), "chosen") == 0) {
+			dm_dbg("parsing subnodes of \"chosen\"\n");
+
+			for (node = ofnode_first_subnode(node);
+			     ofnode_valid(node);
+			     node = ofnode_next_subnode(node)) {
+				dm_dbg("subnode: %s\n", ofnode_get_name(node));
+				err = lists_bind_fdt(parent, node, NULL);
+				if (err && !ret) {
+					ret = err;
+					dm_dbg("%s: ret=%d\n", ofnode_get_name(node), ret);
+				}
+			}
+
+			continue;
+		}
+
 		if (pre_reloc_only &&
 		    !dm_fdt_pre_reloc(blob, offset))
 			continue;
@@ -273,7 +293,7 @@ static int dm_scan_fdt_node(struct udevice *parent, const void *blob,
 			dm_dbg("   - ignoring disabled device\n");
 			continue;
 		}
-		err = lists_bind_fdt(parent, offset_to_ofnode(offset), NULL);
+		err = lists_bind_fdt(parent, node, NULL);
 		if (err && !ret) {
 			ret = err;
 			debug("%s: ret=%d\n", fdt_get_name(blob, offset, NULL),
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 0/3] video patches
@ 2017-07-21 19:07 Rob Clark
  2017-07-21 19:07 ` [U-Boot] [PATCH 2/3] video: simplefb Rob Clark
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Clark @ 2017-07-21 19:07 UTC (permalink / raw)
  To: u-boot

1/3 unchanged, 2/3 updated to use fdtdec_get_addr_size_auto_parent()
to properly parse reg node based on #address-cells and #size-cells,
and 3/3 updated to change kconfig name and slight cleanup.

Rob Clark (3):
  dm: core: also parse chosen node
  video: simplefb
  video: add config option to skip framebuffer clear

 drivers/core/root.c          | 22 +++++++++++++-
 drivers/video/Kconfig        | 18 +++++++++++
 drivers/video/Makefile       |  2 +-
 drivers/video/cfb_console.c  |  3 +-
 drivers/video/simplefb.c     | 71 ++++++++++++++++++++++++++++++++++++++++++++
 drivers/video/video-uclass.c |  4 ++-
 6 files changed, 116 insertions(+), 4 deletions(-)
 create mode 100644 drivers/video/simplefb.c

-- 
2.13.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-28 22:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-03 16:46 [U-Boot] [PATCH 1/3] dm: core: also parse chosen node Rob Clark
2017-08-03 16:47 ` [U-Boot] [PATCH 2/3] video: simplefb Rob Clark
2017-08-28 22:15   ` Anatolij Gustschin
2017-08-03 16:47 ` [U-Boot] [PATCH 3/3] video: add config option to skip framebuffer clear Rob Clark
2017-08-28 22:15   ` Anatolij Gustschin
2017-08-06  5:16 ` [U-Boot] [PATCH 1/3] dm: core: also parse chosen node Simon Glass
  -- strict thread matches above, loose matches on Subject: below --
2017-07-21 19:07 [U-Boot] [PATCH 0/3] video patches Rob Clark
2017-07-21 19:07 ` [U-Boot] [PATCH 2/3] video: simplefb Rob Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox