From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EEA08C05027 for ; Mon, 23 Jan 2023 09:39:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 40519856F6; Mon, 23 Jan 2023 10:39:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=diskos.nl Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=diskos.nl header.i=@diskos.nl header.b="m7Un4yK7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5A03285701; Mon, 23 Jan 2023 10:39:56 +0100 (CET) Received: from smtp.delft.diskos.nl (smtp.delft.diskos.nl [45.80.169.141]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BCEE885351 for ; Mon, 23 Jan 2023 10:39:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=diskos.nl Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=joost@diskos.nl Received: from [10.135.128.1] (smtp.delft.diskos.nl [45.80.169.141]) by smtp.delft.diskos.nl (Postfix) with ESMTPSA id C609A901BD; Mon, 23 Jan 2023 10:39:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=diskos.nl; s=mail; t=1674466791; bh=WkaGE9BWAK4tkKVUK3a2+ZqX9+8YrzY1VDT90VUwlY4=; h=Date:From:Subject:To:Cc:In-Reply-To:References:From; b=m7Un4yK75vhbbVT8JNHXmCTwcYOlf/jzWEcYszDOcOXPiW6uiHWA8qIlqAFhqJKAN iA9xdE2BWOitvnj/OMafcS0LIxAwmUVJnQVDB/63NvQOJcFaI7WGsupJ8Jg9V/qe6R eZPoofDYNwYLQED21mETEaJACJR8FDaZX/me8Y+nOi9mhObrCzW9LJaHUp7uC4qepX r/L1dyiAsDPcc/3JPda6NMsHnvG3b6ORdV2SvKz4Uuuy3MU2lCbjbZmIwcMWq+NyFH ONAVVCyeXhB2ELJMZDnpJaitKrCLj5+uWJr7Ghg3OqXWJLW2Iklw8kV1PLegK+5Chu hSnAYllw/SaqQ== Date: Mon, 23 Jan 2023 10:39:45 +0100 From: Joost van Zwieten Subject: Re: [PATCH] odroid: add CROS_EC to odroid_defconfig To: Peter Robinson Cc: u-boot@lists.denx.de, Simon Glass , Minkyu Kang Message-Id: <9UMXOR.I6HKQCGTLOGL1@diskos.nl> In-Reply-To: References: X-Mailer: geary/3.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Mon, Jan 23, 2023 at 08:33, Peter Robinson wrote: > On Fri, Jan 20, 2023 at 11:17 PM Joost van Zwieten > wrote: >> >> As of commit e44d7e73fe ("dm: core: Switch uclass_*_device_err to >> use >> uclass_*_device_check") U-Boot built with `odroid_defconfig` fails >> to >> initialize on an Odroid U2: `board_late_init()` >> (board/samsung/common/board.c) >> returns with an error due to the absence of the CROS_EC uclass, and >> the >> board >> resets. This patch adds `CROS_EC` to the defconfig, leading to a >> succcessful >> initialization of U-Boot. > > This doesn't seem to be the right fix to the problem, why would an > odroid device have a need for a driver for the ChromeOS Embedded > Controller? For reference, here's the thread that led to this patch: [1]. My board returns `ENODEV` when calling `uclass_first_device_err(UCLASS_CROS_EC, &dev)` with `CROS_EC` enabled, so I don't seem to have this device. At the end of [1] I have suggested an alternative fix: enclosing a couple of statements that assume there's a CROS_EC driver inside an `#ifdef CONFIG_CROS_EC`. Do you think that is a viable approach? I'm not at all familiar with the U-Boot codebase, so forgive me if this doesn't make any sense. [1]: https://lists.denx.de/pipermail/u-boot/2023-January/505627.html > >> Signed-off-by: Joost van Zwieten >> --- >> configs/odroid_defconfig | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/configs/odroid_defconfig b/configs/odroid_defconfig >> index 6e1c29b355..b1ccabd0d2 100644 >> --- a/configs/odroid_defconfig >> +++ b/configs/odroid_defconfig >> @@ -55,6 +55,7 @@ CONFIG_DFU_MMC=y >> CONFIG_SET_DFU_ALT_INFO=y >> CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000 >> CONFIG_SYS_I2C_S3C24X0=y >> +CONFIG_CROS_EC=y >> CONFIG_MMC_DW=y >> CONFIG_MMC_SDHCI=y >> CONFIG_MMC_SDHCI_SDMA=y >> -- >> 2.30.2 >> >> >> >> >>