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 6DB3EC433FE for ; Mon, 28 Nov 2022 16:22:57 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5AA44830EE; Mon, 28 Nov 2022 17:22:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org 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; unprotected) header.d=kernel.org header.i=@kernel.org header.b="PxvM9Aza"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6BD5E80077; Mon, 28 Nov 2022 17:22:53 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 358EA844B1 for ; Mon, 28 Nov 2022 17:22:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=robh@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C3303B80DFA for ; Mon, 28 Nov 2022 16:22:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84DE0C4347C for ; Mon, 28 Nov 2022 16:22:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669652569; bh=guoTYw7Vhf1KyK5W2x+jr93lTh0ByvVPql9dnFWHvPU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=PxvM9Azaj98P5xhk2WymP95hyQyEvQiA+cNF86jfBH5+PhsGuGn1d+yVf1DM/aRyS kllwAaE26fFSjOYoeHCfAjDagA4ATLWKSVbCzWaWe74f85Wjd5zXTY0l27EfX7MX8a 7ugOkt3Y2T96LJMySvB3J3fx3yHfFQrLZ5bbX7J25X1U2dLJ2plog7WuaojfDpRe6B sMdsGCqg3AvV6+jcNN/8skSyIs8AB8isMo4MDNkT4eJPHxR42C88RtQMoZrxOHz3Ak REXOZDrjkkASRSd6+sIHVdW0qT2SRXMlU2ler/r2i3g5st3/EIb7COZNrpwtbSTkHU 0ZiNfq6g6EKpw== Received: by mail-vk1-f180.google.com with SMTP id bi15so5493674vkb.11 for ; Mon, 28 Nov 2022 08:22:49 -0800 (PST) X-Gm-Message-State: ANoB5pmN+BTgxp6tXBedWGlFcr6wBf/Fo9mBfTQdaaD2LRkTtn+Lfqzt VDheX2y4rwcJ3yexsSvk+RQvcXPP4QrY1jKUvA== X-Google-Smtp-Source: AA0mqf6DZbU/38uQV6PTja+uCD/Qzwgqokr682NbO0WMtboRIBRH9LIIibdNH3G1XyWs/pbKxwUXzcbKbrQWqV+LkV0= X-Received: by 2002:a05:6122:200b:b0:3bc:4455:e466 with SMTP id l11-20020a056122200b00b003bc4455e466mr29769403vkd.26.1669652568472; Mon, 28 Nov 2022 08:22:48 -0800 (PST) MIME-Version: 1.0 References: <20221107192055.21669-1-abdellatif.elkhlifi@arm.com> <20221122131751.22747-1-abdellatif.elkhlifi@arm.com> <20221122131751.22747-4-abdellatif.elkhlifi@arm.com> <20221124132115.GA393@e121910.cambridge.arm.com> In-Reply-To: From: Rob Herring Date: Mon, 28 Nov 2022 10:22:36 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 03/10] arm_ffa: introduce Arm FF-A low-level driver To: Simon Glass Cc: Abdellatif El Khlifi , U-Boot Mailing List , nd , Ilias Apalodimas Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Fri, Nov 25, 2022 at 3:18 PM Simon Glass wrote: > > Hi Abdellatif, > > On Thu, 24 Nov 2022 at 06:21, Abdellatif El Khlifi wrote: > > > > On Tue, Nov 22, 2022 at 07:09:16PM -0700, Simon Glass wrote: > > > should be called 'priov' and should beHi Abdellatif, > > > > > [..] > > > > > +/** > > > > + * ffa_device_get - create, bind and probe the arm_ffa device > > > > + * @pdev: the address of a device pointer (to be filled when the a= rm_ffa bus device is created > > > > + * successfully) > > > > + * > > > > + * This function makes sure the arm_ffa device is > > > > + * created, bound to this driver, probed and ready to use. > > > > + * Arm FF-A transport is implemented through a single U-Boot > > > > + * device managing the FF-A bus (arm_ffa). > > > > + * > > > > + * Return: > > > > + * > > > > + * 0 on success. Otherwise, failure > > > > + */ > > > > +int ffa_device_get(struct udevice **pdev) > > > > +{ > > > > + int ret; > > > > + struct udevice *dev =3D NULL; > > > > + > > > > + ret =3D device_bind(dm_root(), DM_DRIVER_GET(arm_ffa), FFA_= DRV_NAME, NULL, ofnode_null(), > > > > + &dev); > > > > > > Please add a DT binding. Even if only temporary, we need something fo= r this. > > > > Thanks for the feedback. I'm happy to address all the comments. > > > > Regarding DT binding and FF-A discovery. We agreed with Linaro and Rob = Herring > > about the following: > > > > - DT is only for what we failed to make discoverable. For hardware, we'= re stuck > > with it. We shouldn't repeat that for software interfaces. This appro= ach is > > already applied in the FF-A kernel driver which comes with no DT supp= ort and > > discovers the bus with bus_register() API [1]. > > This may be the UEFI view, but it is not how U-Boot works. This is not so= mething we are 'stuck' with. It is how we define what is present on a devic= e. This is how the PCI bus works in U-Boot. It is best practice in U-Boot t= o use the device tree to make this things visible and configurable. Unlike = with Linux there is no other way to provide configuration needed by these d= evices. Where do you get UEFI out of this? It is the discoverability of hardware that is fixed (and we are stuck with). We can't change hardware. The disoverability may be PCI VID/PID, USB device descriptors, or nothing. We only use DT when those are not sufficient. For a software interface, there is no reason to make them non-discoverable as the interface can be fixed (at least for new things like FF-A). Rob