mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-25 14:56:03 +00:00
bootstd: Add some more debugging in the bootdev uclass
Add some more output to make it easier to see what is going wrong when a bootdev hunter fails. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
2d5b5a9cdb
commit
3500ae13c6
1 changed files with 8 additions and 1 deletions
|
@ -537,6 +537,8 @@ static int default_get_bootflow(struct udevice *dev, struct bootflow_iter *iter,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = bootdev_get_sibling_blk(dev, &blk);
|
ret = bootdev_get_sibling_blk(dev, &blk);
|
||||||
|
log_debug("sibling_blk ret=%d, blk=%s\n", ret,
|
||||||
|
ret ? "(none)" : blk->name);
|
||||||
/*
|
/*
|
||||||
* If there is no media, indicate that no more partitions should be
|
* If there is no media, indicate that no more partitions should be
|
||||||
* checked
|
* checked
|
||||||
|
@ -662,7 +664,8 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp)
|
||||||
ret = bootdev_hunt_prio(iter->cur_prio,
|
ret = bootdev_hunt_prio(iter->cur_prio,
|
||||||
iter->flags &
|
iter->flags &
|
||||||
BOOTFLOWIF_SHOW);
|
BOOTFLOWIF_SHOW);
|
||||||
log_debug("- hunt ret %d\n", ret);
|
log_debug("- bootdev_hunt_prio() ret %d\n",
|
||||||
|
ret);
|
||||||
if (ret)
|
if (ret)
|
||||||
return log_msg_ret("hun", ret);
|
return log_msg_ret("hun", ret);
|
||||||
}
|
}
|
||||||
|
@ -698,6 +701,7 @@ int bootdev_setup_iter(struct bootflow_iter *iter, const char *label,
|
||||||
/* hunt for any pre-scan devices */
|
/* hunt for any pre-scan devices */
|
||||||
if (iter->flags & BOOTFLOWIF_HUNT) {
|
if (iter->flags & BOOTFLOWIF_HUNT) {
|
||||||
ret = bootdev_hunt_prio(BOOTDEVP_1_PRE_SCAN, show);
|
ret = bootdev_hunt_prio(BOOTDEVP_1_PRE_SCAN, show);
|
||||||
|
log_debug("- bootdev_hunt_prio() ret %d\n", ret);
|
||||||
if (ret)
|
if (ret)
|
||||||
return log_msg_ret("pre", ret);
|
return log_msg_ret("pre", ret);
|
||||||
}
|
}
|
||||||
|
@ -768,6 +772,7 @@ static int bootdev_hunt_drv(struct bootdev_hunter *info, uint seq, bool show)
|
||||||
log_debug("Hunting with: %s\n", name);
|
log_debug("Hunting with: %s\n", name);
|
||||||
if (info->hunt) {
|
if (info->hunt) {
|
||||||
ret = info->hunt(info, show);
|
ret = info->hunt(info, show);
|
||||||
|
log_debug(" - hunt result %d\n", ret);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -833,9 +838,11 @@ int bootdev_hunt_prio(enum bootdev_prio_t prio, bool show)
|
||||||
if (prio != info->prio)
|
if (prio != info->prio)
|
||||||
continue;
|
continue;
|
||||||
ret = bootdev_hunt_drv(info, i, show);
|
ret = bootdev_hunt_drv(info, i, show);
|
||||||
|
log_debug("bootdev_hunt_drv() return %d\n", ret);
|
||||||
if (ret && ret != -ENOENT)
|
if (ret && ret != -ENOENT)
|
||||||
result = ret;
|
result = ret;
|
||||||
}
|
}
|
||||||
|
log_debug("exit %d\n", result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue