diff options
| author | Igor Prusov <[email protected]> | 2023-11-09 13:55:14 +0300 |
|---|---|---|
| committer | Sean Anderson <[email protected]> | 2023-12-15 13:05:54 -0500 |
| commit | 258c1002383e5f0ca1d00cc2e4deae3cb488a26d (patch) | |
| tree | 87642fb19928e3e77d8b2782a4ef0332d6e90629 | |
| parent | 505ef5f627d8bac4281310fe4800cc6c789627e9 (diff) | |
cmd: clk: Use dump function from clk_ops
Add another loop to dump additional info from clock providers that
implement dump operation.
Reviewed-by: Patrice Chotard <[email protected]>
Tested-by: Patrice Chotard <[email protected]>
Reviewed-by: Sean Anderson <[email protected]>
Signed-off-by: Igor Prusov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
| -rw-r--r-- | cmd/clk.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/clk.c b/cmd/clk.c index c7c379d7a61..4b9709d3ff9 100644 --- a/cmd/clk.c +++ b/cmd/clk.c @@ -62,6 +62,7 @@ static void show_clks(struct udevice *dev, int depth, int last_flag) int __weak soc_clk_dump(void) { struct udevice *dev; + const struct clk_ops *ops; printf(" Rate Usecnt Name\n"); printf("------------------------------------------\n"); @@ -69,6 +70,14 @@ int __weak soc_clk_dump(void) uclass_foreach_dev_probe(UCLASS_CLK, dev) show_clks(dev, -1, 0); + uclass_foreach_dev_probe(UCLASS_CLK, dev) { + ops = dev_get_driver_ops(dev); + if (ops && ops->dump) { + printf("\n%s %s:\n", dev->driver->name, dev->name); + ops->dump(dev); + } + } + return 0; } #else |
