aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of/fdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r--drivers/of/fdt.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index dee4fb56b094..b6987bba8556 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -556,6 +556,21 @@ void __init unflatten_device_tree(void)
556 556
557 pr_debug(" -> unflatten_device_tree()\n"); 557 pr_debug(" -> unflatten_device_tree()\n");
558 558
559 if (!initial_boot_params) {
560 pr_debug("No device tree pointer\n");
561 return;
562 }
563
564 pr_debug("Unflattening device tree:\n");
565 pr_debug("magic: %08x\n", be32_to_cpu(initial_boot_params->magic));
566 pr_debug("size: %08x\n", be32_to_cpu(initial_boot_params->totalsize));
567 pr_debug("version: %08x\n", be32_to_cpu(initial_boot_params->version));
568
569 if (be32_to_cpu(initial_boot_params->magic) != OF_DT_HEADER) {
570 pr_err("Invalid device tree blob header\n");
571 return;
572 }
573
559 /* First pass, scan for size */ 574 /* First pass, scan for size */
560 start = ((unsigned long)initial_boot_params) + 575 start = ((unsigned long)initial_boot_params) +
561 be32_to_cpu(initial_boot_params->off_dt_struct); 576 be32_to_cpu(initial_boot_params->off_dt_struct);