[PATCH] samsung: common: ignore if CROS EC is not supported

Stefan Agner stefan at agner.ch
Wed Feb 15 20:03:14 CET 2023


If the CROS device class is not compiled in, uclass returns not
supported. Ignore this case as well.

This avoids boot failures on ODROID-XU4 without CONFIG_CROS_EC
ending with:
cros-ec communications failure -96
Please reset with Power+Refresh
Cannot init cros-ec device

Signed-off-by: Stefan Agner <stefan at agner.ch>
---
 board/samsung/common/board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 16ce5cb892..663d7ca991 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -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;
 
-- 
2.39.1



More information about the U-Boot mailing list