[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACPK8XdzUcb922brKkD8iDPvr4CGdDZXhUPM=mtuHSMc2j0sog@mail.gmail.com>
Date: Mon, 20 Jul 2020 04:47:04 +0000
From: Joel Stanley <joel@....id.au>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Eddie James <eajames@...ux.ibm.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-hwmon@...r.kernel.org, linux-fsi@...ts.ozlabs.org,
devicetree <devicetree@...r.kernel.org>,
Jean Delvare <jdelvare@...e.com>,
Alistair Popple <alistair@...ple.id.au>,
Jeremy Kerr <jk@...abs.org>, Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH 2/3] fsi: occ: Add support for P10
On Sun, 19 Jul 2020 at 22:13, Guenter Roeck <linux@...ck-us.net> wrote:
>
> On Fri, May 01, 2020 at 10:08:32AM -0500, Eddie James wrote:
> > The P10 OCC has a different SRAM address for the command and response
> > buffers. In addition, the SBE commands to access the SRAM have changed
> > format. Add versioning to the driver to handle these differences.
> >
> > Signed-off-by: Eddie James <eajames@...ux.ibm.com>
>
> I don't recall seeing a maintainer Ack for this patch, nor any response
> at all. I'd be happy to apply the patch through hwmon, but I would need
> an Ack from a maintainer.
That would be great. I had one question before it goes in, but once
Eddie has sorted that out it can go through your tree.
>
> Thanks,
> Guenter
>
> > ---
> > drivers/fsi/fsi-occ.c | 126 ++++++++++++++++++++++++++++++------------
> > 1 file changed, 92 insertions(+), 34 deletions(-)
> > @@ -508,6 +557,7 @@ static int occ_probe(struct platform_device *pdev)
> > struct occ *occ;
> > struct platform_device *hwmon_dev;
> > struct device *dev = &pdev->dev;
> > + const void *md = of_device_get_match_data(dev);
> > struct platform_device_info hwmon_dev_info = {
> > .parent = dev,
> > .name = "occ-hwmon",
> > @@ -517,6 +567,7 @@ static int occ_probe(struct platform_device *pdev)
> > if (!occ)
> > return -ENOMEM;
> >
> > + occ->version = (enum versions)md;
The 0day bot warns about this when bulding for 64 bit architectures.
How about you drop the match data and instead match on the compatible
string to know which version to expect?
> > occ->dev = dev;
> > occ->sbefifo = dev->parent;
> > mutex_init(&occ->occ_lock);
> > @@ -575,7 +626,14 @@ static int occ_remove(struct platform_device *pdev)
> > }
> >
> > static const struct of_device_id occ_match[] = {
> > - { .compatible = "ibm,p9-occ" },
> > + {
> > + .compatible = "ibm,p9-occ",
> > + .data = (void *)occ_p9
> > + },
> > + {
> > + .compatible = "ibm,p10-occ",
> > + .data = (void *)occ_p10
> > + },
> > { },
> > };
> >
Powered by blists - more mailing lists