]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
samsung: common: do not reset if cros-ec uclass is missing
authorHenrik Grimler <henrik@grimler.se>
Tue, 9 May 2023 19:05:47 +0000 (21:05 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 15 May 2023 21:14:46 +0000 (17:14 -0400)
Otherwise non-ChromeOS samsung devices, like the odroid boards, are
stuck in a bootloop if CONFIG_CROS_EC is not enabled:

    <...>
    MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0
    Loading Environment from MMC... *** Warning - bad CRC, using default environment

    cros-ec communications failure -96

    Please reset with Power+Refresh

    Cannot init cros-ec device
    resetting ...

Issue started after commit e44d7e73fe0d ("dm: core: Switch
uclass_*_device_err to use uclass_*_device_check").

Signed-off-by: Henrik Grimler <henrik@grimler.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/common/board.c

index 16ce5cb892534c45bf4578d81ae073e41498e2ed..663d7ca991bce5b753739f92b686cff6a0fc03ad 100644 (file)
@@ -223,7 +223,7 @@ int board_late_init(void)
        char mmcbootdev_str[16];
 
        ret = uclass_first_device_err(UCLASS_CROS_EC, &dev);
-       if (ret && ret != -ENODEV) {
+       if (ret && ret != -ENODEV && ret != -EPFNOSUPPORT) {
                /* Force console on */
                gd->flags &= ~GD_FLG_SILENT;