diff options
author | Tom Rini <trini@konsulko.com> | 2019-05-06 07:18:51 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-05-06 07:19:31 -0400 |
commit | 44237e272f1eac3b026709e76333a07b2d3a3523 (patch) | |
tree | 43c87a14ae5142c31417bbee904b60a3533ef518 /cmd | |
parent | 8b77ea90a7055f1da2931baca03d102dfa08aa36 (diff) | |
parent | 41e30dcf87962e4bcc8d4197b3d808af14f71e92 (diff) | |
download | u-boot-44237e272f1eac3b026709e76333a07b2d3a3523.tar.gz |
Merge branch 'master' of git://git.denx.de/u-boot-sh
- Various pinctrl / gpio fixes for R-Car
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/clk.c | 24 | ||||
-rw-r--r-- | cmd/mmc.c | 2 |
2 files changed, 15 insertions, 11 deletions
@@ -17,6 +17,7 @@ int __weak soc_clk_dump(void) struct uclass *uc; struct clk clk; int ret; + ulong rate; /* Device addresses start at 1 */ ret = uclass_get(UCLASS_CLK, &uc); @@ -26,20 +27,23 @@ int __weak soc_clk_dump(void) uclass_foreach_dev(dev, uc) { memset(&clk, 0, sizeof(clk)); ret = device_probe(dev); - if (ret) { - printf("%-30.30s : ? Hz\n", dev->name); - continue; - } + if (ret) + goto noclk; ret = clk_request(dev, &clk); - if (ret) { - printf("%-30.30s : ? Hz\n", dev->name); - continue; - } - - printf("%-30.30s : %lu Hz\n", dev->name, clk_get_rate(&clk)); + if (ret) + goto noclk; + rate = clk_get_rate(&clk); clk_free(&clk); + + if (rate == -ENODEV) + goto noclk; + + printf("%-30.30s : %lu Hz\n", dev->name, rate); + continue; + noclk: + printf("%-30.30s : ? Hz\n", dev->name); } return 0; @@ -26,7 +26,7 @@ static void print_mmcinfo(struct mmc *mmc) printf("Bus Speed: %d\n", mmc->clock); #if CONFIG_IS_ENABLED(MMC_VERBOSE) - printf("Mode : %s\n", mmc_mode_name(mmc->selected_mode)); + printf("Mode: %s\n", mmc_mode_name(mmc->selected_mode)); mmc_dump_capabilities("card capabilities", mmc->card_caps); mmc_dump_capabilities("host capabilities", mmc->host_caps); #endif |