From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754588AbcITNXR (ORCPT ); Tue, 20 Sep 2016 09:23:17 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:65356 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754494AbcITNXP (ORCPT ); Tue, 20 Sep 2016 09:23:15 -0400 From: Arnd Bergmann To: Gabriele Paoloni Cc: "liudongdong (C)" , "helgaas@kernel.org" , "rafael@kernel.org" , "Lorenzo.Pieralisi@arm.com" , "tn@semihalf.com" , "Wangzhou (B)" , "pratyush.anand@gmail.com" , "linux-pci@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jcm@redhat.com" , "Chenxin (Charles)" , "hanjun.guo@linaro.org" , Linuxarm Subject: Re: [RFC PATCH V2 1/3] PCI: hisi: re-architect Hip05/Hip06 controllers driver to preapare for ACPI Date: Tue, 20 Sep 2016 15:22:40 +0200 Message-ID: <3554735.zkBHRv36Sl@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <1472644094-82731-1-git-send-email-liudongdong3@huawei.com> <6532722.cVEMfv9Kqj@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:JlTxLODF2JeeIoBSW+rei6+KmDiOixc6ZMKZ1nHc7fJ6bv3bez1 t4Y1jLebJhJaZSxH5i+pjFD5573ItsO4NGgWJaWDDbKY49t2Z1i2pXMETt3O6gsqAcKJicD yJ9A4lUfBEVdfPKXLIIpzIf1D6NgjlYQvfxFG5qP+4B4TLzah5j0TRqRnI1faHtf97I/NQ7 J/Od0w60RT9sPEJxdZY1A== X-UI-Out-Filterresults: notjunk:1;V01:K0:4OGk7Q3ta+U=:VO7MFkz+0xMfYIZfil4D0D E+iYZ/Y2z6qSSC3WcirC/iqwdgzrxLRfHsv2qwN/YjgZsntZR0qOoMgTA6cBjfr2NXh20ygOT /7VaMwul4sGpTyf4PR5j7cBQEppx+pKL0/AB3DIyB8DxngOyCPUAwxNJvCVEc6hXDL8At3Fua cAyKlSELo97LlC88uvDo3s25ABqdTM9BkkBjMgEy+dfmApgDv4d5wesmzED0DkfPTwor2fJm0 N/D3UxdMw0OioPWInnrvPnJo4uUU2IPPwEn1gplT2aZgLIrYLNObLCgNnDEJHaLaJW7IPFRqe /IlXs4jm+oW0BPa+ibp1MS9r8wGulvc8A9csAm4W7LL7tyTQf5etePOZjeIfMmQd9RnZCBsE/ P4cGDC0Y+pzRJilGNHH+0w607Nuc+bSUOGWMbm1hr61xEc7gblcQWU3bsnrZtV1IR22SIUJTI xqh71zQN5ShdytUGGZsOfDzrSs9TNmtiuwLYsTXwYKF4VZvjaCi9dbxbCUtNtWsg+fmoPHDpg 5XV0LmMqAZa5ulyFTYIqKT1xHMF3m9dyJxFCG3TjSqGIupfpBJUGQOXE1d6IU1gLzJGF+FZLs bveOTzCG7zA5+Mx/3aT//SSPKCms88Mh+thzU1xIbH8sIa29YbXXihh8bfy4gMOAUC16uRaPE opaUZ1LGmNNrz9ah48iLYxLoOFCpsbh/mxfl4fWj/F8f9Jjb8P2yPkD4I11hoVHxcFJv/WKqU 5smREVHOHi+SOMZw Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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