#define MAX_LEVEL 32 /* how deeply nested we will go */
#define SCRATCHPAD 1024 /* bytes of scratchpad memory */
-#define CMD_FDT_MAX_DUMP 64
/*
* Global data (for the gd->bd)
static void print_data(const void *data, int len)
{
int j;
+ const char *env_max_dump;
+ ulong max_dump = ULONG_MAX;
/* no data, don't print */
if (len == 0)
return;
+ env_max_dump = env_get("fdt_max_dump");
+ if (env_max_dump)
+ max_dump = simple_strtoul(env_max_dump, NULL, 16);
+
/*
* It is a string, but it may have multiple strings (embedded '\0's).
*/
}
if ((len %4) == 0) {
- if (len > CMD_FDT_MAX_DUMP)
+ if (len > max_dump)
printf("* 0x%p [0x%08x]", data, len);
else {
const __be32 *p;
printf(">");
}
} else { /* anything else... hexdump */
- if (len > CMD_FDT_MAX_DUMP)
+ if (len > max_dump)
printf("* 0x%p [0x%08x]", data, len);
else {
const u8 *s;