diff options
author | Nick Kossifidis <mick@ics.forth.gr> | 2018-11-09 19:53:17 -0500 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2018-12-03 18:41:59 -0500 |
commit | e1e5254427525d59a184771b122469c998e53b58 (patch) | |
tree | c09bf343733749924b9d5f20981972af38d80679 /drivers/of/fdt.c | |
parent | a2237fec1e0645d1e99e108f2658c26cb5a66c74 (diff) |
OF: Add a warning in case chosen node is not present
On architectures that only get their bootargs through devicetree's
chosen node (such as RISC-V), that node is mandatory. After a
discussion with Rob [1] I'm adding a warning in case chosen node
is not present, to let users know about it.
[1]: https://patchwork.ozlabs.org/patch/984224/#2016136
Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r-- | drivers/of/fdt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index cd72a41fcab2..7099c652c6a5 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
@@ -1207,8 +1207,12 @@ bool __init early_init_dt_verify(void *params) | |||
1207 | 1207 | ||
1208 | void __init early_init_dt_scan_nodes(void) | 1208 | void __init early_init_dt_scan_nodes(void) |
1209 | { | 1209 | { |
1210 | int rc = 0; | ||
1211 | |||
1210 | /* Retrieve various information from the /chosen node */ | 1212 | /* Retrieve various information from the /chosen node */ |
1211 | of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line); | 1213 | rc = of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line); |
1214 | if (!rc) | ||
1215 | pr_warn("No chosen node found, continuing without\n"); | ||
1212 | 1216 | ||
1213 | /* Initialize {size,address}-cells info */ | 1217 | /* Initialize {size,address}-cells info */ |
1214 | of_scan_flat_dt(early_init_dt_scan_root, NULL); | 1218 | of_scan_flat_dt(early_init_dt_scan_root, NULL); |