[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3554735.zkBHRv36Sl@wuerfel>
Date: Tue, 20 Sep 2016 15:22:40 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Gabriele Paoloni <gabriele.paoloni@...wei.com>
Cc: "liudongdong (C)" <liudongdong3@...wei.com>,
"helgaas@...nel.org" <helgaas@...nel.org>,
"rafael@...nel.org" <rafael@...nel.org>,
"Lorenzo.Pieralisi@....com" <Lorenzo.Pieralisi@....com>,
"tn@...ihalf.com" <tn@...ihalf.com>,
"Wangzhou (B)" <wangzhou1@...ilicon.com>,
"pratyush.anand@...il.com" <pratyush.anand@...il.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"jcm@...hat.com" <jcm@...hat.com>,
"Chenxin (Charles)" <charles.chenxin@...wei.com>,
"hanjun.guo@...aro.org" <hanjun.guo@...aro.org>,
Linuxarm <linuxarm@...wei.com>
Subject: Re: [RFC PATCH V2 1/3] PCI: hisi: re-architect Hip05/Hip06 controllers driver to preapare for ACPI
On Tuesday, September 20, 2016 9:45:13 AM CEST Gabriele Paoloni wrote:
> >
> > I think this would be easier if you separate the ACPI code from the
> > DT code and not try to have a common file used for both.
> >
> > Sharing the config space accessors really isn't worth it when both
> > variants are fairly simple to do, but they don't fit in a common
> > model because one is called from the ACPI quirks and the other
> > is called from the dw-pcie driver with completely different calling
> > conventions.
>
> Not sure about this...
> From my perspective having the shared code would make clear that
> the two drivers (ACPI and DT) are kind of related...
>
> For example see the reply from Bjorn to the xgene driver:
> https://lkml.org/lkml/2016/9/19/749
>
> I know in our case the duplication isn't much but as I said
> I am a bit reluctant to rework this...
It's clearly a question of perspective: The way I see it, this
is not a driver at all, but a quirk for the acpi-pci driver,
and having hardware specific code shared between the two
complicates things.
In both cases (xgene and hisi), only a very small portion of
PCI host driver is needed as for the ACPI quirk, while all
of the hardware specific setup can be left to the firmware
here.
Arnd
Powered by blists - more mailing lists