uboot-mvebu: add support for espressobin
[openwrt/staging/yousong.git] / package / boot / uboot-mvebu / patches / 130-mmc-xenon_sdhci-Add-missing-common-host-capabilities.patch
1 From 264c45575ec6a3d507dc4e43954b8a78283aca6c Mon Sep 17 00:00:00 2001
2 From: Andre Heider <a.heider@gmail.com>
3 Date: Thu, 10 Sep 2020 17:58:43 +0200
4 Subject: [PATCH] mmc: xenon_sdhci: Add missing common host capabilities
5
6 Use mmc_of_parse() to set the common host properties. That includes
7 "bus-width", so parsing it can be removed from the driver.
8
9 But more importantly, "non-removable" is now respected, which fixes
10 the usage of eMMC.
11
12 Signed-off-by: Andre Heider <a.heider@gmail.com>
13 ---
14 drivers/mmc/xenon_sdhci.c | 18 ++++--------------
15 1 file changed, 4 insertions(+), 14 deletions(-)
16
17 --- a/drivers/mmc/xenon_sdhci.c
18 +++ b/drivers/mmc/xenon_sdhci.c
19 @@ -485,20 +485,10 @@ static int xenon_sdhci_probe(struct udev
20 armada_3700_soc_pad_voltage_set(host);
21
22 host->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_DDR_52MHz;
23 - switch (fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "bus-width",
24 - 1)) {
25 - case 8:
26 - host->host_caps |= MMC_MODE_8BIT;
27 - break;
28 - case 4:
29 - host->host_caps |= MMC_MODE_4BIT;
30 - break;
31 - case 1:
32 - break;
33 - default:
34 - printf("Invalid \"bus-width\" value\n");
35 - return -EINVAL;
36 - }
37 +
38 + ret = mmc_of_parse(dev, &plat->cfg);
39 + if (ret)
40 + return ret;
41
42 host->ops = &xenon_sdhci_ops;
43