]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: Add support for the no-mmc-hs400 prop
authorJonas Karlman <jonas@kwiboo.se>
Mon, 8 Apr 2024 21:06:16 +0000 (21:06 +0000)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 26 Apr 2024 06:31:44 +0000 (15:31 +0900)
The linux commit f722e650d965 ("mmc: core: add support for disabling
HS400 mode via DT") added support for a no-mmc-hs400 prop.

Add support for the no-mmc-hs400 prop to disable HS400 host caps.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/mmc-uclass.c

index 22c64aa949134fca0d05eabe251c7e0d0d1166c9..24170c59ecc1b3aeb3e92d022ad051f6f2dbaf18 100644 (file)
@@ -262,6 +262,9 @@ int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg)
                cfg->host_caps |= MMC_CAP(MMC_HS_400) | MMC_CAP(MMC_HS_200);
        if (dev_read_bool(dev, "mmc-hs400-enhanced-strobe"))
                cfg->host_caps |= MMC_CAP(MMC_HS_400_ES);
+       if (dev_read_bool(dev, "no-mmc-hs400"))
+               cfg->host_caps &= ~(MMC_CAP(MMC_HS_400) |
+                                   MMC_CAP(MMC_HS_400_ES));
 
        if (dev_read_bool(dev, "non-removable")) {
                cfg->host_caps |= MMC_CAP_NONREMOVABLE;