Message ID | 20201223023030.2023937-6-sjg@chromium.org |
---|---|
State | Accepted |
Commit | 45ad176a7608c20162c4bc0895f2f31d0f773379 |
Delegated to: | Simon Glass |
Headers | show |
Series | dm: Preparation for enhanced of-platdata | expand |
At present the output from this function is hard to read in SPL, due to
(intended) limitations in SPL's printf() function. Add an SPL version so
it is clearer.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
(no changes since v1)
drivers/core/dump.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Applied to u-boot-dm/next, thanks!
diff --git a/drivers/core/dump.c b/drivers/core/dump.c index 20125473212..7784ec02dea 100644 --- a/drivers/core/dump.c +++ b/drivers/core/dump.c @@ -14,11 +14,13 @@ static void show_devices(struct udevice *dev, int depth, int last_flag) { int i, is_last; struct udevice *child; + u32 flags = dev->flags; /* print the first 20 characters to not break the tree-format. */ - printf(" %-10.10s %3d [ %c ] %-20.20s ", dev->uclass->uc_drv->name, + printf(IS_ENABLED(CONFIG_SPL_BUILD) ? " %s %d [ %c ] %s " : + " %-10.10s %3d [ %c ] %-20.20s ", dev->uclass->uc_drv->name, dev_get_uclass_index(dev, NULL), - dev->flags & DM_FLAG_ACTIVATED ? '+' : ' ', dev->driver->name); + flags & DM_FLAG_ACTIVATED ? '+' : ' ', dev->driver->name); for (i = depth; i >= 0; i--) { is_last = (last_flag >> i) & 1;
At present the output from this function is hard to read in SPL, due to (intended) limitations in SPL's printf() function. Add an SPL version so it is clearer. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v1) drivers/core/dump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)