diff options
author | Tom Rini <trini@konsulko.com> | 2020-07-07 22:58:18 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-07 22:58:18 -0400 |
commit | 0b59138690a93f3d880be3d5aa675f7219376e58 (patch) | |
tree | b139bf8d951a50c2196f3f36dc2f5ab2f3bb1cc7 /drivers/core/dump.c | |
parent | 1e88e78177da80fa8e9fa9fc7613657478d61d1e (diff) | |
parent | 9b9f10e3ccded02443162980d34be517886b0645 (diff) |
Merge branch '2020-07-07-misc-new-features'
- Improve s700 SoC support
- Fix building with clang on ARM.
- Juno platform updates
- fs/dm cmd improvements
- Other assorted improvements / fixes
Diffstat (limited to 'drivers/core/dump.c')
-rw-r--r-- | drivers/core/dump.c | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/drivers/core/dump.c b/drivers/core/dump.c index cb8a25b9ad..6debaf97a1 100644 --- a/drivers/core/dump.c +++ b/drivers/core/dump.c @@ -97,7 +97,7 @@ void dm_dump_uclass(void) } } -void dm_dump_drivers(void) +void dm_dump_driver_compat(void) { struct driver *d = ll_entry_start(struct driver, driver); const int n_ents = ll_entry_count(struct driver, driver); @@ -120,3 +120,56 @@ void dm_dump_drivers(void) printf("%-20.20s %s\n", "", match->compatible); } } + +void dm_dump_drivers(void) +{ + struct driver *d = ll_entry_start(struct driver, driver); + const int n_ents = ll_entry_count(struct driver, driver); + struct driver *entry; + struct udevice *udev; + struct uclass *uc; + int i; + + puts("Driver uid uclass Devices\n"); + puts("----------------------------------------------------------\n"); + + for (entry = d; entry < d + n_ents; entry++) { + uclass_get(entry->id, &uc); + + printf("%-25.25s %-3.3d %-20.20s ", entry->name, entry->id, + uc ? uc->uc_drv->name : "<no uclass>"); + + if (!uc) { + puts("\n"); + continue; + } + + i = 0; + uclass_foreach_dev(udev, uc) { + if (udev->driver != entry) + continue; + if (i) + printf("%-51.51s", ""); + + printf("%-25.25s\n", udev->name); + i++; + } + if (!i) + puts("<none>\n"); + } +} + +void dm_dump_static_driver_info(void) +{ + struct driver_info *drv = ll_entry_start(struct driver_info, + driver_info); + const int n_ents = ll_entry_count(struct driver_info, driver_info); + struct driver_info *entry; + + puts("Driver Address\n"); + puts("---------------------------------\n"); + for (entry = drv; entry != drv + n_ents; entry++) { + printf("%-25.25s @%08lx\n", entry->name, + (ulong)map_to_sysmem(entry->platdata)); + } +} |