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 EC2E0C433FE for ; Mon, 28 Nov 2022 16:27:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8BE56852B5; Mon, 28 Nov 2022 17:27:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.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=linaro.org header.i=@linaro.org header.b="mGkNGisa"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9E718852B7; Mon, 28 Nov 2022 17:27:24 +0100 (CET) Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) (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 00046852A0 for ; Mon, 28 Nov 2022 17:27:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-lf1-x134.google.com with SMTP id b3so18235509lfv.2 for ; Mon, 28 Nov 2022 08:27:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=skVeThBz/qtgZwLz+1dGc6cM0Cdw5wZAZiry6pAPmBA=; b=mGkNGisa1WC5xGSqVGmidFa6cCcinN/S2WQkC0IOVVc6UOVxy/PHht8+blnC/5BTkz Wjfwr6ZRMku59twvfs0cmSoywKlORnGohG9SZUxeVnzilsf+SRB0ZLE6MbcsjHj0ZOmb c0HQ2ax4/sy5E0536x13sdG07sNXZpc4B1Tmr3PgWWTJnIcwVAu631ooAc0YzA+v3mQc CFY/9HCGD1twHv+EJPJao3j6q9ysdw8Z8N/CxQUWWbzgYo8PtdoNJ/Oi/cNEdrfzTsfx opzjpcOBg66LJ/fhBBl+bY5tb+JU+zANmPy3OmG5W/R4hSROqOrnXtGc1ojvdOEfCFdv KT/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=skVeThBz/qtgZwLz+1dGc6cM0Cdw5wZAZiry6pAPmBA=; b=oQB/ZIri++yT4bdS/OsdfUHqtGkh2F7zBmOpU4sR8cEx+FDMn+YS3+0rtt3zsCHYO+ Nsq34IUW8kMrvQ7MOBI/L//8AjcbfCzykl+55TldvmfDSNzemWdoSRBry9gwhpZPM+ie xrDVdYakG9JaURPkoYFWBHpkOdtzd1boUjwchA+AaHfHRMhwaBzk5vjTZa31KI0vcndL c4/pqYKr/hZYCQu5/bXzwZskRGPjc1v0ivc1RQsJdQdo1MUO8NQbOMM43uGZQ1EKdIpv z93IQvD08V5MDJpOAFLlYbp/wLy5IY1rFDhVm3MpJu4WSWWua8jfV9tZD6Rx25hcS8mn lGjw== X-Gm-Message-State: ANoB5pniOpL2vIa4ynbTzlUSRFY7FolPInzL7bBcLS1srfPV/k+tTKrM e7iqDAlpPwU3RsVs4sks5421uOV38ySilwJqTG8Hxw== X-Google-Smtp-Source: AA0mqf7+0NeyI560EpsOeVsvjx3TcIDI8ETkEmZXsLQ6aTljeeHZKmN5mRBproHe2M0wtdm2DuIuo4E4zpuabHdVT3w= X-Received: by 2002:a19:ca1b:0:b0:4a7:7d62:2807 with SMTP id a27-20020a19ca1b000000b004a77d622807mr20120485lfg.77.1669652841238; Mon, 28 Nov 2022 08:27:21 -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: Ilias Apalodimas Date: Mon, 28 Nov 2022 18:26:44 +0200 Message-ID: Subject: Re: [PATCH v8 03/10] arm_ffa: introduce Arm FF-A low-level driver To: Rob Herring Cc: Simon Glass , Abdellatif El Khlifi , U-Boot Mailing List , nd 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 Hi all On Mon, 28 Nov 2022 at 18:22, Rob Herring wrote: > > 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= arm_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), FF= A_DRV_NAME, NULL, ofnode_null(), > > > > > + &dev); > > > > > > > > Please add a DT binding. Even if only temporary, we need something = for 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 Ro= b Herring > > > about the following: > > > > > > - DT is only for what we failed to make discoverable. For hardware, w= e're stuck > > > with it. We shouldn't repeat that for software interfaces. This app= roach is > > > already applied in the FF-A kernel driver which comes with no DT su= pport 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 = something we are 'stuck' with. It is how we define what is present on a dev= ice. This is how the PCI bus works in U-Boot. It is best practice in U-Boot= to use the device tree to make this things visible and configurable. Unlik= e with Linux there is no other way to provide configuration needed by these= devices. > > 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). I'll agree with Rob here. In fact the first version of the patchset *did* have this as a DT node. We explicitly asked Abdellatif to change this, so u-boot and the linux kernel can have an identical approach in discovering FF-A Regards /Ilias > > Rob