[U-Boot,v5,06/15] spl: fit: be more verbose when an error occurs when applying the overlays
diff mbox series

Message ID 20190920152824.18958-7-jjhiblot@ti.com
State Superseded
Delegated to: Tom Rini
Headers show
  • Add support for applications of overlays in SPL
Related show

Commit Message

Jean-Jacques Hiblot Sept. 20, 2019, 3:28 p.m. UTC
There are many ways the overlay application can fail.
2 of them are probably the most common:
- the application itself failed. Usually this is comes from an unresolved
- DTBO not available in FIT (could be because of a typo)

In both case it is good to be more explicit about the error and at least
show which overlay is failing.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 common/spl/spl_fit.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff mbox series

diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 187dd5ab3f..cdbba3705d 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -113,7 +113,7 @@  static int spl_fit_get_image_node(const void *fit, int images,
 	node = fdt_subnode_offset(fit, images, str);
 	if (node < 0) {
-		debug("cannot find image node '%s': %d\n", str, node);
+		pr_err("cannot find image node '%s': %d\n", str, node);
 		return -EINVAL;
@@ -359,8 +359,11 @@  static int spl_fit_append_fdt(struct spl_image_info *spl_image,
 			ret = fdt_overlay_apply_verbose(spl_image->fdt_addr,
 							(void *)image_info.load_addr);
-			if (ret)
+			if (ret) {
+				pr_err("failed to apply DT overlay %s\n",
+				       fit_get_name(fit, node, NULL));
+			}
 			debug("%s: DT overlay %s applied\n", __func__,
 			      fit_get_name(fit, node, NULL));