Message ID | 20180106192954.17753-1-marek.vasut+renesas@gmail.com |
---|---|
State | Superseded |
Delegated to: | Masahiro Yamada |
Headers | show |
Series | [U-Boot,1/7] mmc: uniphier-sd: Use mmc_of_parse() | expand |
On 01/06/2018 08:29 PM, Marek Vasut wrote: > Drop the ad-hoc DT caps parsing in favor of common framework function. > > Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> > Cc: Jaehoon Chung <jh80.chung@samsung.com> > Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Just for completeness, this all applies to u-boot/next , since the HS200 patches which are in next are needed. I'd really appreciate it if these were applied right after that u-boot/next hits u-boot/master after 2018.01 is out .
diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c index 741f9dfd9c..552e37d852 100644 --- a/drivers/mmc/uniphier-sd.c +++ b/drivers/mmc/uniphier-sd.c @@ -799,24 +799,15 @@ static int uniphier_sd_probe(struct udevice *dev) return ret; } - plat->cfg.name = dev->name; - plat->cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS; - - switch (fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "bus-width", - 1)) { - case 8: - plat->cfg.host_caps |= MMC_MODE_8BIT; - break; - case 4: - plat->cfg.host_caps |= MMC_MODE_4BIT; - break; - case 1: - break; - default: - dev_err(dev, "Invalid \"bus-width\" value\n"); - return -EINVAL; + ret = mmc_of_parse(dev, &plat->cfg); + if (ret < 0) { + dev_err(dev, "failed to parse host caps\n"); + return ret; } + plat->cfg.name = dev->name; + plat->cfg.host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS; + if (quirks) { priv->caps = quirks; } else {
Drop the ad-hoc DT caps parsing in favor of common framework function. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> --- drivers/mmc/uniphier-sd.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-)