public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] samsung: common: ignore if CROS EC is not supported
@ 2023-02-15 19:03 Stefan Agner
  2023-02-15 23:50 ` Simon Glass
  2023-02-16  8:13 ` Henrik Grimler
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Agner @ 2023-02-15 19:03 UTC (permalink / raw)
  To: u-boot; +Cc: sjg, stefan

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@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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] samsung: common: ignore if CROS EC is not supported
  2023-02-15 19:03 [PATCH] samsung: common: ignore if CROS EC is not supported Stefan Agner
@ 2023-02-15 23:50 ` Simon Glass
  2023-02-16  8:13 ` Henrik Grimler
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2023-02-15 23:50 UTC (permalink / raw)
  To: Stefan Agner; +Cc: u-boot

On Wed, 15 Feb 2023 at 12:03, Stefan Agner <stefan@agner.ch> wrote:
>
> 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@agner.ch>
> ---
>  board/samsung/common/board.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] samsung: common: ignore if CROS EC is not supported
  2023-02-15 19:03 [PATCH] samsung: common: ignore if CROS EC is not supported Stefan Agner
  2023-02-15 23:50 ` Simon Glass
@ 2023-02-16  8:13 ` Henrik Grimler
  1 sibling, 0 replies; 3+ messages in thread
From: Henrik Grimler @ 2023-02-16  8:13 UTC (permalink / raw)
  To: Stefan Agner; +Cc: u-boot, sjg

Hi Stefan,

On Wed, Feb 15, 2023 at 08:03:14PM +0100, Stefan Agner wrote:
> 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

Thanks, the same issue happens on odroid-u2 (and probably other
devices as well), issue was reported in
https://lists.denx.de/pipermail/u-boot/2023-January/504115.html, and I
sent an identical patch in
https://lists.denx.de/pipermail/u-boot/2023-February/508929.html.

Best regards,
Henrik Grimler

> Signed-off-by: Stefan Agner <stefan@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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-16  8:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-15 19:03 [PATCH] samsung: common: ignore if CROS EC is not supported Stefan Agner
2023-02-15 23:50 ` Simon Glass
2023-02-16  8:13 ` Henrik Grimler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox