]> git.baikalelectronics.ru Git - uboot.git/commitdiff
bootstd: Add a little more logging of bootflows
authorSimon Glass <sjg@chromium.org>
Tue, 17 Jan 2023 17:48:18 +0000 (10:48 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 23 Jan 2023 23:11:41 +0000 (18:11 -0500)
Add some logging to aid debugging of problems with bootflows.

Signed-off-by: Simon Glass <sjg@chromium.org>
boot/bootdev-uclass.c
boot/bootflow.c

index 522ecf38eb379591ebf799cffaf58c344b804fc2..99ee08e33530e36365682169643d9083388cea0e 100644 (file)
@@ -546,6 +546,7 @@ int bootdev_get_bootflow(struct udevice *dev, struct bootflow_iter *iter,
 {
        const struct bootdev_ops *ops = bootdev_get_ops(dev);
 
+       log_debug("->get_bootflow %s=%p\n", dev->name, ops->get_bootflow);
        bootflow_init(bflow, dev, iter->method);
        if (!ops->get_bootflow)
                return default_get_bootflow(dev, iter, bflow);
index 03a180bcddcb2d4bc497029c568c3436697f2069..dc3f1f0c7315ecb194ea3bbfb7af990f579ca6a4 100644 (file)
@@ -367,6 +367,7 @@ int bootflow_scan_first(struct udevice *dev, const char *label,
 
        ret = bootflow_check(iter, bflow);
        if (ret) {
+               log_debug("check - ret=%d\n", ret);
                if (ret != BF_NO_MORE_PARTS && ret != -ENOSYS) {
                        if (iter->flags & BOOTFLOWF_ALL)
                                return log_msg_ret("all", ret);
@@ -386,11 +387,13 @@ int bootflow_scan_next(struct bootflow_iter *iter, struct bootflow *bflow)
 
        do {
                ret = iter_incr(iter);
+               log_debug("iter_incr: ret=%d\n", ret);
                if (ret == BF_NO_MORE_DEVICES)
                        return log_msg_ret("done", ret);
 
                if (!ret) {
                        ret = bootflow_check(iter, bflow);
+                       log_debug("check - ret=%d\n", ret);
                        if (!ret)
                                return 0;
                        iter->err = ret;
@@ -399,6 +402,7 @@ int bootflow_scan_next(struct bootflow_iter *iter, struct bootflow *bflow)
                                        return log_msg_ret("all", ret);
                        }
                } else {
+                       log_debug("incr failed, err=%d\n", ret);
                        iter->err = ret;
                }