Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C19C8C47088 for ; Wed, 26 May 2021 12:53:11 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BA9E361026 for ; Wed, 26 May 2021 12:53:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA9E361026 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 28F3382D2C; Wed, 26 May 2021 14:53:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="ffau9JDc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1ACDC82E2F; Wed, 26 May 2021 14:53:06 +0200 (CEST) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8EA9B82B4E for ; Wed, 26 May 2021 14:53:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72a.google.com with SMTP id q10so799525qkc.5 for ; Wed, 26 May 2021 05:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vXIiEX5EBTZkOXxYb4CCR1gBH2vkXkwVGbmIpUxr5Eo=; b=ffau9JDci+syfhyFLx/aGyMwSn9D7hT5I7ClMLN4futI/7hwwk7+OpBdJdPfDVFbkX gBRmCfO6igc29n3uGUPecRuWmzkMEPU7D/I+aZOOiuEMR0TPGGq8ACQ9j+yy2wToP7/d kiuBSlUFZ+yVGko7NKdLYTpGQwLEnLh2p51M8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vXIiEX5EBTZkOXxYb4CCR1gBH2vkXkwVGbmIpUxr5Eo=; b=Xsn2oalcqWU5w7CbdFHQjb+BoyafvNyn5NUbYLjjeUF6xrBTLBk38H8YlrZVBDugJd +2I8VkY5pxxp89vQdeF3yxwy4FZ9NJGDobDjFzaVcro1G8hJCNdH3b+BRh4nq53oqMJA fxcKUR8U2f/vVUon6lnToKX4BAm4N1aCL48KPmIf/PFY86CWcgYrTSiplAb7gT4ytRYo JgVWZC8m1eiHuM0xeT5nAwQPc+d7V9fC6nBkx50XVLBSxRDEutRS0lv1Gf7rZDezx4sO cHTipB6YvprVzcuPhXUrsHDUfoBEhF5+3clDPJMktLjCcDdQKNxyWMmuqxaWVgNUCgKv jiyQ== X-Gm-Message-State: AOAM5312Oui5bFfqHPatFrBX6RWgAMIeJVruWabdo5z3YusbrvkIJ4vt KkhKKGosZ7T8k7u2/mNrv4eU2g== X-Google-Smtp-Source: ABdhPJyL8oCyzVAJCq0hS68KJ+GBXVJExc+0GJTJ3yTtuf3nS2en6p8F7bodDr3L3vF7vgSvvUlS0Q== X-Received: by 2002:a05:620a:1223:: with SMTP id v3mr39874417qkj.470.1622033581396; Wed, 26 May 2021 05:53:01 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-44f7-db59-05d0-6286.res6.spectrum.com. [2603:6081:7b01:cbda:44f7:db59:5d0:6286]) by smtp.gmail.com with ESMTPSA id s5sm1480768qkg.88.2021.05.26.05.52.59 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 May 2021 05:53:00 -0700 (PDT) Date: Wed, 26 May 2021 08:52:58 -0400 From: Tom Rini To: Marek Behun Cc: Simon Glass , u-boot@lists.denx.de Subject: Re: problems with boards with CONFIG_DM disabled Message-ID: <20210526125258.GZ17669@bill-the-cat> References: <20210526012756.31c98fa2@thinkpad> <20210526022554.1104c350@thinkpad> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MnBGTs6NGcZf+K4O" Content-Disposition: inline In-Reply-To: <20210526022554.1104c350@thinkpad> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.4 at phobos.denx.de X-Virus-Status: Clean --MnBGTs6NGcZf+K4O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 26, 2021 at 02:25:54AM +0200, Marek Behun wrote: > On Wed, 26 May 2021 01:27:56 +0200 > Marek Behun wrote: >=20 > > Tom, Simon, > >=20 > > now that LTO is merged I am working on > > Support SPI NORs and OF partitions in `mtd list` > >=20 > > but CI fails for some boards, see > > https://github.com/u-boot/u-boot/pull/55 > >=20 > > The reason is that there are still several boards which do not use > > CONFIG_DM. > >=20 > > On the previous version Simon commented that I should use > > if (IS_ENABLED(...)) > > instead of > > #if > > but this does not currently work for those boards with CONFIG_DM > > disabled (struct udevice's members are not visible at all, and > > functions from dm/device.h do not exist). > >=20 > > There are multiple possible workarounds: > > - use #if (until all boards are at CONFIG_DM) > > - create static inline versions of functions from dm/device.h returning > > failures when CONFIG_DM is not set (this would be rather big :( ) > > - wait till all those boards with CONFIG_DM disabled are removed > > - ... >=20 > Since there is rather a large number of defconfigs with CONFIG_DM > disabled, and since the relevant code was rather complex >=20 > if (!is_part && dev && mtd->dev =3D=3D dev) || > !strcmp(name, mtd->name) || > (is_part && mtd->dev && !strcmp(name, mtd->dev->name)) >=20 > I moved the code into a separate name matching function and for now > created a non-DM version. >=20 > Hopefully this will be acceptable and pass CI. There's two parts to it, I suppose. First, looking at the failed build: https://dev.azure.com/u-boot/u-boot/_build/results?buildId=3D2297&view=3Dlo= gs&j=3D9905d24b-10d5-587f-b981-9e43e4414ee0&t=3D4fbb7fc6-2c55-511b-8011-582= 67bbd0b81&l=3D510 that's not a no-CONFIG_DM migration (SPL_DM is not required). Second, I wonder what it would look like on top of my WIP/make-DM_USB-fatal branch as that has removed a number of non-migrated boards. The deadline for CONFIG_DM causing removal itself is still a bit away, but that branch does remove a number of boards. --=20 Tom --MnBGTs6NGcZf+K4O Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmCuRKcACgkQFHw5/5Y0 tywvzAv7BvGQX11WmmM11MePI2vuL6m3ECJRqrh/Bkrnxzwy516cFbRFe3azJIEd Bsjb9v0xlRIHizSrG5GAbjV4PUB3gAir8mVqhtuv/6rn8eXTXxUeT9FRp0mg5Z3Z EceF+rqSH+F/w73hjhIfqAkSiMYFm3jy1rSpupGrHCMzSQDwRMh1bNjjdmILBZF1 pB6aFvM3il6CpwHbtt3j1b4px3MaifViGrBm7+wPAVTwWe9trFnPM1QSmtZIpOuZ Z27T3McPEX3LjdMRU2tS4Qzf2ukV1OjAhUsroRsX7MvUFi+tQIIQT/uJTgFgPcMC tOdOMP27YUK1mgs5JdHYXskNb/KiYg9KPLzs7W40ci+nRJA4g+xY1OIKClL9uweA ocDGwQl5UdwzhARCN9TK891WFEZVB7TG9G9Lb3okz++GBPqPLUJS6w/wEbLabk7H y6jSSg3rqsawyY/Zg+Mc4dBuZ5jUmKzAaP8zACzre655B07tqFA+QLf2J7D64ejX 1sYdWqk6 =Vi6Q -----END PGP SIGNATURE----- --MnBGTs6NGcZf+K4O--