From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [RFC PATCH 0/4] Add ACPI support for HiSilicon PCIe Host Controllers Date: Thu, 04 Feb 2016 17:07:17 +0100 Message-ID: <76564455.dlc1WHiVY2@wuerfel> References: <1454585860-60709-1-git-send-email-gabriele.paoloni@huawei.com> <2387127.DMZaDnZvEW@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from mout.kundenserver.de ([212.227.126.133]:54923 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933784AbcBDQIL (ORCPT ); Thu, 4 Feb 2016 11:08:11 -0500 In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Gabriele Paoloni Cc: "Guohanjun (Hanjun Guo)" , "Wangzhou (B)" , "liudongdong (C)" , Linuxarm , qiujiang , "bhelgaas@google.com" , "Lorenzo.Pieralisi@arm.com" , "tn@semihalf.com" , zhangjukuo , "xuwei (O)" , "Liguozhu (Kenneth)" , "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jcm@redhat.com" On Thursday 04 February 2016 15:11:18 Gabriele Paoloni wrote: > > > > ACPI has its own PCI support, and should not need drivers for host > > bridges. I don't think we can really mix the two things, as ACPI > > needs to have access to things like PCI config space way before > > we are probing normal device drivers. > > > > Please put this in drivers/acpi/pci*.c. > > I can put pcie-hisi-acpi.c under drivers/acpi/ > > However if you look at the driver it is made up of three parts: > pcie-hisi.c --> the DT based driver > pcie-hisi-acpi.c --> the ACPI based hook and ACPI specific init callback > pcie-hisi-common.c --> common functions shared between DT and ACPI versions > of the driver > > Now I think that moving pcie-hisi-acpi.c under drivers/acpi/ > would make it hard to read as you need to jump across directories > and it seems a bit unnatural... > > However it is not a big issue to me... That's not really what I meant though: the pcie-hisi driver uses the pcie-designware.c library, most of which makes no sense in an environment where you have ACPI, e.g. link training, custom MSI support, initial register setup, platform driver hooks, etc. You should add a very minimal set of hacks for the parts in this driver that diverge from a standard SBSA compliant PCIe host that ACPI expects. Arnd