===================================================================
@@ -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;