[PATCH 3/3] ARM: beagleplay: put external device tree into handoff data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pass the dtb from 1st stage loader to barebox using handoff data.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 arch/arm/boards/beagleplay/lowlevel.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boards/beagleplay/lowlevel.c b/arch/arm/boards/beagleplay/lowlevel.c
index 9d76dbd0a2..228484bf4e 100644
--- a/arch/arm/boards/beagleplay/lowlevel.c
+++ b/arch/arm/boards/beagleplay/lowlevel.c
@@ -5,21 +5,27 @@
 #include <asm/barebox-arm.h>
 #include <debug_ll.h>
 #include <pbl.h>
+#include <pbl/handoff-data.h>
+#include <compressed-dtb.h>
 
 /* Called from assembly */
-void beagleplay(void);
+void beagleplay(void *dtb);
 
-static noinline void beagleplay_continue(void)
+static noinline void beagleplay_continue(void *dtb)
 {
 	unsigned long membase, memsize;
 	extern char __dtb_k3_am625_beagleplay_start[];
+	unsigned int size;
 
 	fdt_find_mem(__dtb_k3_am625_beagleplay_start, &membase, &memsize);
 
+	if (blob_is_valid_fdt_ptr(dtb, membase, memsize, &size))
+		handoff_data_add(HANDOFF_DATA_EXTERNAL_DT, dtb, size);
+
 	barebox_arm_entry(membase, memsize, __dtb_k3_am625_beagleplay_start);
 }
 
-void beagleplay(void)
+void beagleplay(void *dtb)
 {
 	putc_ll('>');
 
@@ -29,5 +35,5 @@ void beagleplay(void)
 
 	setup_c();
 
-	beagleplay_continue();
+	beagleplay_continue(dtb);
 }

-- 
2.39.5





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux