[RFC PATCH v3 2/7] bus/cdx: add the cdx bus driver
Gupta, Nipun
Nipun.Gupta at amd.com
Thu Sep 8 06:29:49 PDT 2022
[AMD Official Use Only - General]
> -----Original Message-----
> From: Greg KH <gregkh at linuxfoundation.org>
> Sent: Wednesday, September 7, 2022 6:03 PM
> To: Gupta, Nipun <Nipun.Gupta at amd.com>
> Cc: robh+dt at kernel.org; krzysztof.kozlowski+dt at linaro.org; rafael at kernel.org;
> eric.auger at redhat.com; alex.williamson at redhat.com; cohuck at redhat.com;
> Gupta, Puneet (DCG-ENG) <puneet.gupta at amd.com>;
> song.bao.hua at hisilicon.com; mchehab+huawei at kernel.org; maz at kernel.org;
> f.fainelli at gmail.com; jeffrey.l.hugo at gmail.com; saravanak at google.com;
> Michael.Srba at seznam.cz; mani at kernel.org; yishaih at nvidia.com;
> jgg at ziepe.ca; jgg at nvidia.com; robin.murphy at arm.com; will at kernel.org;
> joro at 8bytes.org; masahiroy at kernel.org; ndesaulniers at google.com; linux-arm-
> kernel at lists.infradead.org; linux-kbuild at vger.kernel.org; linux-
> kernel at vger.kernel.org; devicetree at vger.kernel.org; kvm at vger.kernel.org;
> okaya at kernel.org; Anand, Harpreet <harpreet.anand at amd.com>; Agarwal,
> Nikhil <nikhil.agarwal at amd.com>; Simek, Michal <michal.simek at amd.com>;
> Radovanovic, Aleksandar <aleksandar.radovanovic at amd.com>; git (AMD-Xilinx)
> <git at amd.com>
> Subject: Re: [RFC PATCH v3 2/7] bus/cdx: add the cdx bus driver
>
> [CAUTION: External Email]
>
> On Tue, Sep 06, 2022 at 07:17:56PM +0530, Nipun Gupta wrote:
> > CDX bus supports the scanning and probing of FPGA based
> > devices. These devices are registers as CDX devices.
> >
> > The bus driver sets up the basic infrastructure and fetches
> > the device related information from the firmware.
> >
> > CDX bus is capable of scanning devices dynamically,
> > supporting rescanning of dynamically added, removed or
> > updated devices.
>
> Really? Then why is the platform driver mess still in here?
>
>
> > --- /dev/null
> > +++ b/drivers/bus/cdx/cdx.c
> > @@ -0,0 +1,437 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Platform driver for CDX bus.
>
> Again, this should not be a platform driver.
>
> Now you can have a CDX "bus" driver, that is a platform driver, but that
> needs to be in a separate file and as a separate module and totally
> independant of the CDX bus code entirely.
>
> Otherwise this is a mess to try to sift through and determine what is,
> and is not, going on. Please split that up and get rid of all of the
> platform driver stuff here and put it in a separate patch that happens
> after the CDX bus logic is added.
Platform device/driver is essentially the CDX bus controller here and there are
existing busses like fsl-mc and rsb bus which are having similar bus and platform
driver in same file.
As you mention to make things cleaner (and which seems more appropriate) we
will segregate the bus code and platform bus controller into different patches
and files. We will include the change in the next RFC.
Thanks,
Nipun
>
> thanks,
>
> greg k-h
More information about the linux-arm-kernel
mailing list