[PATCH v8 03/10] arm_ffa: introduce Arm FF-A low-level driver
Simon Glass
sjg at chromium.org
Sun Dec 4 20:22:11 CET 2022
Hi Rob,
On Tue, 29 Nov 2022 at 05:22, Rob Herring <robh at kernel.org> wrote:
>
> On Fri, Nov 25, 2022 at 3:18 PM Simon Glass <sjg at chromium.org> wrote:
> >
> > Hi Abdellatif,
> >
> > On Thu, 24 Nov 2022 at 06:21, Abdellatif El Khlifi <abdellatif.elkhlifi at arm.com> 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 = NULL;
> > > > > +
> > > > > + ret = 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 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 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 approach is
> > > already applied in the FF-A kernel driver which comes with no DT support 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 device. 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. Unlike with Linux there is no other way to provide configuration needed by these devices.
>
> Where do you get UEFI out of this?
I assume it was UEFI as there was no discussion about this in U-Boot.
Which firmware project was consulted about 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).
Here I am talking about the controller itself, the top-level node in
the device tree. For PCI this is a device tree node and it should be
the same here. So I am not saying that the devices on the bus need to
be in the device tree (that can be optional, but may be useful in some
situations where it is status and known). We need something like:
ff-a {
compatible = "something";
};
I don't know what mechanism is actually used to communicate with it,
but that will be enough to get the top-level driver started.
If Linux does not want to use the node, that it another thing, but I
respectfully request that U-Boot's needs be considered more carefully.
I'd also like to see more willingness to accommodate open-source
software in these designs.
Regards,
Simon
More information about the U-Boot
mailing list