diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-12-30 02:00:07 +0900 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2018-01-22 14:11:58 +0900 |
commit | 4b28f7bc930347cb99a6ee2f213ce9db34e36697 (patch) | |
tree | 9952e75f27f47119bb22e2a850457b5cc34e79d8 /drivers/mmc/mmc-uclass.c | |
parent | c42ee367fdab51eb9add12e73e8a25306030bd44 (diff) | |
download | u-boot-4b28f7bc930347cb99a6ee2f213ce9db34e36697.tar.gz u-boot-4b28f7bc930347cb99a6ee2f213ce9db34e36697.tar.xz u-boot-4b28f7bc930347cb99a6ee2f213ce9db34e36697.zip |
mmc: let mmc_of_parse() fail for insane bus-width value
You must fix your DT if it specifies insane bus-width, for example,
bus-width = <3>;
debug() is not displayed in usual configuration, so people will not
even notice weirdness. Use dev_err() instead, then let it fail.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'drivers/mmc/mmc-uclass.c')
-rw-r--r-- | drivers/mmc/mmc-uclass.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index 7910a3e278..a3536b15ae 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -140,10 +140,8 @@ int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg) cfg->host_caps |= MMC_MODE_1BIT; break; default: - debug("warning: %s invalid bus-width property. using 1-bit\n", - dev_read_name(dev)); - cfg->host_caps |= MMC_MODE_1BIT; - break; + dev_err(dev, "Invalid \"bus-width\" value %u!\n", val); + return -EINVAL; } /* f_max is obtained from the optional "max-frequency" property */ |