[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0hp1+D4Hd+6EQeZb_WNn6JK=55h8AAOwAWYX2CwATP0dw@mail.gmail.com>
Date: Tue, 10 May 2016 19:54:17 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Tomasz Nowicki <tn@...ihalf.com>
Cc: Bjorn Helgaas <helgaas@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Will Deacon <will.deacon@....com>,
Catalin Marinas <catalin.marinas@....com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Hanjun Guo <hanjun.guo@...aro.org>,
Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
Sinan Kaya <okaya@...eaurora.org>, jchandra@...adcom.com,
robert.richter@...iumnetworks.com, mw@...ihalf.com,
Liviu.Dudau@....com, David Daney <ddaney@...iumnetworks.com>,
wangyijing@...wei.com,
Suravee Suthikulanit <Suravee.Suthikulpanit@....com>,
Mark Salter <msalter@...hat.com>,
Linux PCI <linux-pci@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"linaro-acpi@...ts.linaro.org" <linaro-acpi@...ts.linaro.org>,
Jon Masters <jcm@...hat.com>, andrea.gallo@...aro.org,
dhdang@....com, jeremy.linton@....com, liudongdong3@...wei.com,
Christopher Covington <cov@...eaurora.org>
Subject: Re: [PATCH V7 08/11] pci, acpi: Support for ACPI based generic PCI
host controller
On Tue, May 10, 2016 at 5:19 PM, Tomasz Nowicki <tn@...ihalf.com> wrote:
> This patch is going to implement generic PCI host controller for
> ACPI world, similar to what pci-host-generic.c driver does for DT world.
>
> All such drivers, which we have seen so far, were implemented within
> arch/ directory since they had some arch assumptions (x86 and ia64).
> However, they all are doing similar thing, so it makes sense to find
> some common code and abstract it into the generic driver.
>
> In order to handle PCI config space regions properly, we define new
> MCFG interface which does sanity checks on MCFG table and keeps its
> root pointer. User is able to lookup MCFG regions based on that root
> pointer and specified domain:bus_start:bus_end touple. We are using
> pci_mmcfg_late_init old prototype to avoid another function name.
>
> The implementation of pci_acpi_scan_root() looks up the MCFG entries
> and sets up a new mapping (regions are not mapped until host controller ask
> for it). Generic PCI functions are used for accessing config space.
> Driver selects PCI_ECAM and uses functions from drivers/pci/ecam.h
> to create and access ECAM mappings.
>
> As mentioned in Kconfig help section, ACPI_PCI_HOST_GENERIC choice
> should be made on a per-architecture basis.
>
> Signed-off-by: Tomasz Nowicki <tn@...ihalf.com>
> Signed-off-by: Jayachandran C <jchandra@...adcom.com>
> ---
> drivers/acpi/Kconfig | 8 +++
> drivers/acpi/Makefile | 1 +
> drivers/acpi/pci_mcfg.c | 97 ++++++++++++++++++++++++++
> drivers/acpi/pci_root_generic.c | 149 ++++++++++++++++++++++++++++++++++++++++
Why do we need a new file? Would there be any problem with adding
that code to pci_root.c?
Powered by blists - more mailing lists