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 7DB9AC32771 for ; Mon, 26 Sep 2022 06:14:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 639EF8499D; Mon, 26 Sep 2022 08:14:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=lespocky.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id AD20084A37; Mon, 26 Sep 2022 08:14:22 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) (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 5E116848E3 for ; Mon, 26 Sep 2022 08:14:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=lespocky.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=post@lespocky.de Received: from methusalix.internal.home.lespocky.de ([92.117.45.79]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MN5Nt-1ov3bm0rtV-00J20X; Mon, 26 Sep 2022 08:14:07 +0200 Received: from falbala.internal.home.lespocky.de ([192.168.243.94]) by methusalix.internal.home.lespocky.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ochNT-0007i7-QO; Mon, 26 Sep 2022 08:14:05 +0200 Date: Mon, 26 Sep 2022 08:14:02 +0200 From: Alexander Dahl To: Simon Glass Cc: Michal Simek , Alexander Dahl , U-Boot Mailing List Subject: Re: [PATCH v2 1/8] dm: fpga: Introduce new uclass Message-ID: References: <20220921132216.7089-1-ada@thorsis.com> <20220921132216.7089-2-ada@thorsis.com> <47adbb34-a655-62e8-9197-0953b9072870@amd.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="19slGxAxG5APpQhO" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/2.0.5 (2021-01-21) X-Scan-Signature: 2000bb58c225ca56a47c4cb1a8369acb X-Provags-ID: V03:K1:eE1qfa3BvqdYD2TJ99bKL+AyL3AMXVLoG7BvDuSBv7jF5tQC5b0 gGx0Nl/C4mufIgSoVk+K2YBtU0v1vAShjefP9CSRBd4r969Ij6fC3MwEUjsYYIeaY8INNwP z8ZXjHZE4Q0mn3Wj+mAy7C+5z4ut/pbGz6OB6lwTWuofiq1IPUyU4A3lv0103jb2tZWJqb5 A641ht3iweC8VWAS38ieQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:buQHMyuZuhA=:uh9iU1TR/89pIyiXWHLwzY KiA3xjNnxKkZpDHb6BzjmiUpy0/TYyDBViowH+xg2lnaCvgY74gxMdwOYuPqwGWgwRtgP2iVe I6u+uGa+ZMZE1kKYdCLyd45GIs1zCJs4TnUIau+v1/gcgnWsCEc04o0Mbqx4NyqNxJaqMfyT9 UyNuLXjB8ni3SkoaONsI4o9ty9XBTfwrvk+t7YQFpBSJhGKj2kSbCLjKUjgV+RIyH4ncU6C/p nWIv7aTqrvkXImxdMSJaxn7iNTgTUDJ+316A0jxe5gO3toDnByiYm6SxL/y3PcpySKXCHuD20 BYXdHVZZNDY6BXhywi1HizUBtI2/BHy6AdafNQEPkRMqlOmoYm8RibrS4amzGrvQiIePnk6/S jZPmwanGG3vcZmAs3wKROL+sHaz6eJjuLcBXltG5oIk6+f3eCQ8D1WKntNzQefzNRrUlsE7I3 AYRWLCZOK07r2tIbRTedMoZcSUh3jtsf4PI5gpLpIedJadUIbRJAmzfSIfA62SaCkQlt0W8pX mBE7HDMNkjvPEdw/S8eP5D9dcKqVllWaHQn44qP5phKJsQCuO8KxDbk/vEoxz942oEUB3TYA0 RrGjVIPzUv6YGqeBI5xeJfStIV54HSmu8ypgsvMDVTP6rBEFuprsOHRt97z9abt9TAMv05GNI edZGU4AjMJyXTfjii3uink30AqPySiuoKVg9yll6eFycunxwXvYSdGY1fLM4iTklHoByccOBJ CZ6QZ5V3qSvSt5LlpARw7RVJvgLxxPn7ubzEgLj0ERl1kj9LjP7tc60xvJmQh8JAbjlw0W/Uv YU6OcaF 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 --19slGxAxG5APpQhO Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Simon, Am Sun, Sep 25, 2022 at 08:15:38AM -0600 schrieb Simon Glass: > Hi Michal, >=20 > On Thu, 22 Sept 2022 at 05:45, Michal Simek wrote: > > > > > > > > On 9/22/22 13:35, Simon Glass wrote: > > > Hi, > > > > > > On Thu, 22 Sept 2022 at 12:27, Michal Simek wr= ote: > > >> > > >> > > >> > > >> On 9/21/22 15:22, Alexander Dahl wrote: > > >>> For future DM based FPGA drivers and for now to have a meaningful > > >>> logging class for old FPGA drivers. > > >>> > > >>> Suggested-by: Michal Simek > > >>> Signed-off-by: Alexander Dahl > > >>> --- > > >>> include/dm/uclass-id.h | 1 + > > >>> 1 file changed, 1 insertion(+) > > >>> > > >>> diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h > > >>> index a432e43871..c2b15881ba 100644 > > >>> --- a/include/dm/uclass-id.h > > >>> +++ b/include/dm/uclass-id.h > > >>> @@ -56,6 +56,7 @@ enum uclass_id { > > >>> UCLASS_ETH, /* Ethernet device */ > > >>> UCLASS_ETH_PHY, /* Ethernet PHY device */ > > >>> UCLASS_FIRMWARE, /* Firmware */ > > >>> + UCLASS_FPGA, /* FPGA device */ > > >>> UCLASS_FUZZING_ENGINE, /* Fuzzing engine */ > > >>> UCLASS_FS_FIRMWARE_LOADER, /* Generic loader */ > > >>> UCLASS_GPIO, /* Bank of general-purpose I/O pins = */ > > >> > > >> Simon: the whole series look good to me. I am happy to take it via m= y tree when > > >> you ACK it. Also no problem if you want to take it via your tree. > > >> Please let me know which way you want to go. > > > > > > This is a good step forward but needs a lot more work. > > > > > > Please add a uclass file for the FPGA - i.e. > > > drivers/fpga/fpga-uclass.c - see other such files for examples. > > > > > > The FPGA uclass should have methods that match the non-DM interface. > > > You will likely need a DM_FPGA config to allow enabling the uclass. > > > > > > Also this needs a simple sandbox driver/emulator pair, so that it can > > > be tested, with tests in test/dm/fpga.c that use the driver. > > > > > > Admittedly this should have been done ages ago. I vaguely remember > > > mentioning it at the time, but perhaps I missed it. In any case, all > > > uclasses must have an API, implementation and tests that run in CI > > > with sandbox. Testing is a vital part of U-Boot and lack of testing is > > > the main reason why we went back to the 3-month release cycle. > > > > It can be done in steps for sure. Issues which Alex is addressing are t= here for > > quite some time and I think we shouldn't gate them by adding requiremen= t to > > create the whole fpga uclass. It can be done on the top of this series. > > We know that it has to happen but I wouldn't push Alex to do it as cond= ition for > > applying this series. > > From my perspective if he has time to do, let's start with it. If not = it can be > > done later. >=20 > Well if this is a start, then let's make it a real start. At minimum: >=20 > - add a uclass file with the uclass driver > - we can skip having any methods for now > - add a sandbox driver which does nothing > - add a test which probes the sandbox device >=20 > That is about 50 lines of code and people can then add to it over time. FWIW, I already did that on the weekend, I just have to look over it again and maybe give it some polishing before sending. Draft ist here: https://github.com/LeSpocky/u-boot/commit/49efd2a2d0129b977d38340c836bbbb1f= 080043b > Without that, I'd rather not have the UCLASS_FPGA. That's okay I guess. Will just take me some time, it's not that easy if you have to learn about DM and UT first, and try it in the end of the day. ;-) Greets Alex --=20 /"\ ASCII RIBBON | =BBWith the first link, the chain is forged. The first \ / CAMPAIGN | speech censured, the first thought forbidden, the X AGAINST | first freedom denied, chains us all irrevocably.=AB / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) --19slGxAxG5APpQhO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEwo7muQJjlc+Prwj6NK3NAHIhXMYFAmMxQyYACgkQNK3NAHIh XMbHJQ/+Lh8djOYXkC1xsOUYw2BAvKDslFAPLCP4nelOURVcXMXoIc7jLJ8NzEd4 /cly1YGNsMHmF3wmJJJlrZjQCauHdgcUbxSH8BiHbq1omP2vCV8be6lqlt2mnUfM g853H+2RU7YWMANhdpf54+jr5aqlUE1dbkWbKWARKt26E2sdRORAqVTvYUwMfs9R uqDFPVJhWjzHV9REboB0iVwLkVNs4oTIHDTMYymX/7z9voNrwoab8WExm/Iz9fut J94LxcLQapUo2HrHx8IQTqiLG0mIjiqPKKqWhFul6A2WyqSHupvTF6uUWmR5Y6iv nLq59kbco05XxpufVzRTM0y8AQ0QkbjspcH8g43GWXsfMoGiFDhovfw6jFszZ1Ve S66T11QiPP/IJPBDeEv7m8iSQOVfwSiq2u7yVQBYZR9V9T4K+nh61qtUJNVMiw76 yBpbfmt534TTamyDV1QsG0srVGA8ImC5hqT5bIteyihE6eXkP55q1xLp6FYacb2E G6IPi94THp0IJJQNgL3hHd3tl8RrYDyD5QovoZ6YylMdAvRzb6ntBOlq9mkbBQIK PyvFCZG5tOMHZpJelWV62thjPwz42zoKGkR1D8ZiZo8c7D/fLEIBQ/KR24EB6zHL 31BKl5LcPQwrbCjKp1N2Bnd2MKc1ZlQXm39LXyZ4Ci9eZtcwgYE= =U7+b -----END PGP SIGNATURE----- --19slGxAxG5APpQhO--