diff options
author | Michael Neuling <mikey@neuling.org> | 2006-05-31 08:31:51 +1000 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2006-06-07 09:42:15 -0500 |
commit | 38e8f8fd88dae07ef8ada9d6baa41b06a4d9ac9f (patch) | |
tree | c97e2c644cb65e0019b7784281b2e98ae9195d68 /livetree.c | |
parent | 05ae3d8eebdad2b8da6e02eeca3baa3cc54fe5f3 (diff) | |
download | dtc-38e8f8fd88dae07ef8ada9d6baa41b06a4d9ac9f.tar.gz |
dtc: add setting of physical boot cpu
dtc always sets the physical boot CPU to 0xfeedbeef. Add a -b option to
set this. Also add warnings when using the wrong property with the
wrong blob version.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Diffstat (limited to 'livetree.c')
-rw-r--r-- | livetree.c | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -456,7 +456,7 @@ static int check_root(struct node *root) return ok; } -static int check_cpus(struct node *root) +static int check_cpus(struct node *root, int outversion, int boot_cpuid_phys) { struct node *cpus, *cpu; struct property *prop; @@ -518,8 +518,15 @@ static int check_cpus(struct node *root) } } - if (! bootcpu) - WARNMSG("No cpu has \"linux,boot-cpu\" property\n"); + if (outversion < 2) { + if (! bootcpu) + WARNMSG("No cpu has \"linux,boot-cpu\" property\n"); + } else { + if (bootcpu) + WARNMSG("\"linux,boot-cpu\" property is deprecated in blob version 2 or higher\n"); + if (boot_cpuid_phys == 0xfeedbeef) + WARNMSG("physical boot CPU not set. Use -b option to set\n"); + } return ok; } @@ -697,7 +704,7 @@ static void fixup_phandles(struct node *root, struct node *node) fixup_phandles(root, child); } -int check_device_tree(struct node *dt) +int check_device_tree(struct node *dt, int outversion, int boot_cpuid_phys) { int ok = 1; @@ -713,7 +720,7 @@ int check_device_tree(struct node *dt) return 0; ok = ok && check_root(dt); - ok = ok && check_cpus(dt); + ok = ok && check_cpus(dt, outversion, boot_cpuid_phys); ok = ok && check_memory(dt); ok = ok && check_chosen(dt); if (! ok) |