*/
static void __init early_init_dt_check_for_elfcorehdr(unsigned long node)
{
- const __be32 *prop;
- int len;
-
if (!IS_ENABLED(CONFIG_CRASH_DUMP))
return;
pr_debug("Looking for elfcorehdr property... ");
- prop = of_get_flat_dt_prop(node, "linux,elfcorehdr", &len);
- if (!prop || (len < (dt_root_addr_cells + dt_root_size_cells)))
+ if (!of_flat_dt_get_addr_size(node, "linux,elfcorehdr",
+ &elfcorehdr_addr, &elfcorehdr_size))
return;
- elfcorehdr_addr = dt_mem_next_cell(dt_root_addr_cells, &prop);
- elfcorehdr_size = dt_mem_next_cell(dt_root_size_cells, &prop);
-
pr_debug("elfcorehdr_start=0x%llx elfcorehdr_size=0x%llx\n",
elfcorehdr_addr, elfcorehdr_size);
}