diff options
author | Tom Rini <trini@konsulko.com> | 2020-08-24 09:06:02 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-24 09:06:02 -0400 |
commit | 1aa3966173fe92fa3c46638ee8eb8b8491f521d6 (patch) | |
tree | 3c56e11089c590734d01bf967d0a185e3c0e9505 /cmd | |
parent | d584648dad691caec3ecc7777dbfa3f1936878e5 (diff) | |
parent | ebd3f1f0d032cc35dfb8d03da7f7ade6e9a51aef (diff) |
Merge tag 'u-boot-clk-24Aug2020' of https://gitlab.denx.de/u-boot/custodians/u-boot-clk
- Add CCF clocks definitions for iMX6Q enet (ETH)
- Several fixes for CCF framework - the most notable is the one, which
adds get_rate helper to clk-mux.c
- Improvements for clk command - better visibility and alignment.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/clk.c | 35 |
1 files changed, 18 insertions, 17 deletions
@@ -23,31 +23,32 @@ static void show_clks(struct udevice *dev, int depth, int last_flag) clkp = dev_get_clk_ptr(dev); if (device_get_uclass_id(dev) == UCLASS_CLK && clkp) { + depth++; rate = clk_get_rate(clkp); - printf(" %-12u %8d ", rate, clkp->enable_count); - - for (i = depth; i >= 0; i--) { - is_last = (last_flag >> i) & 1; - if (i) { - if (is_last) - printf(" "); - else - printf("| "); - } else { - if (is_last) - printf("`-- "); - else - printf("|-- "); + printf(" %-12u %8d ", rate, clkp->enable_count); + + for (i = depth; i >= 0; i--) { + is_last = (last_flag >> i) & 1; + if (i) { + if (is_last) + printf(" "); + else + printf("| "); + } else { + if (is_last) + printf("`-- "); + else + printf("|-- "); + } } - } - printf("%s\n", dev->name); + printf("%s\n", dev->name); } list_for_each_entry(child, &dev->child_head, sibling_node) { is_last = list_is_last(&child->sibling_node, &dev->child_head); - show_clks(child, depth + 1, (last_flag << 1) | is_last); + show_clks(child, depth, (last_flag << 1) | is_last); } } |