From: Domenico Andreoli <domenico.andreoli@linux.com>

This is the very minimal support of DT that currently the decompressor
console provides. That is reading the command line from the DT.

This means that pure DT machines currently need some console data to
be shipped to the decompressor (tags have their DT table) although they
already provide all the required info in the DT, where the decompressor
should ideally take them.

So the current blocker here is what to extract from DT. Or, what to _put_
into the DT for the decompressor.

Signed-off-by: Domenico Andreoli <domenico.andreoli@linux.com>
---
 arch/arm/boot/compressed/console.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Index: b/arch/arm/boot/compressed/console.c
===================================================================
--- a/arch/arm/boot/compressed/console.c
+++ b/arch/arm/boot/compressed/console.c
@@ -24,11 +24,19 @@
 
 #include "arch.h"
 
+const char *get_fdt_prop(void *fdt, const char *path, const char *prop);
+
 static const char *get_cmdline(void *atag_fdt)
 {
 	struct tag *atag = atag_fdt;
+	const char *cmdline;
+
+	/* let's try with DT */
+	cmdline = get_fdt_prop(atag_fdt, "/chosen", "bootargs");
+	if (cmdline)
+		return cmdline;
 
-	/* validate the ATAG */
+	/* no DT, validate the ATAG */
 	if (atag->hdr.tag != ATAG_CORE ||
 	    (atag->hdr.size != tag_size(tag_core) && atag->hdr.size != 2))
 		return NULL;


