aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini2019-05-06 07:18:51 -0400
committerTom Rini2019-05-06 07:19:31 -0400
commit44237e272f1eac3b026709e76333a07b2d3a3523 (patch)
tree43c87a14ae5142c31417bbee904b60a3533ef518 /cmd
parent8b77ea90a7055f1da2931baca03d102dfa08aa36 (diff)
parent41e30dcf87962e4bcc8d4197b3d808af14f71e92 (diff)
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.c24
-rw-r--r--cmd/mmc.c2
2 files changed, 15 insertions, 11 deletions
diff --git a/cmd/clk.c b/cmd/clk.c
index fd4231589c5..5402c87de72 100644
--- a/cmd/clk.c
+++ b/cmd/clk.c
@@ -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;
diff --git a/cmd/mmc.c b/cmd/mmc.c
index 8bc3648193c..6f3cb85cc04 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -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