summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorNick Kossifidis <mick@ics.forth.gr>2018-11-10 02:53:17 +0200
committerRob Herring <robh@kernel.org>2018-12-03 17:41:59 -0600
commite1e5254427525d59a184771b122469c998e53b58 (patch)
treec09bf343733749924b9d5f20981972af38d80679 /drivers/of
parenta2237fec1e0645d1e99e108f2658c26cb5a66c74 (diff)
downloadlinux-e1e5254427525d59a184771b122469c998e53b58.tar.bz2
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')
-rw-r--r--drivers/of/fdt.c6
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)
void __init early_init_dt_scan_nodes(void)
{
+ int rc = 0;
+
/* Retrieve various information from the /chosen node */
- of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line);
+ rc = of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line);
+ if (!rc)
+ pr_warn("No chosen node found, continuing without\n");
/* Initialize {size,address}-cells info */
of_scan_flat_dt(early_init_dt_scan_root, NULL);