From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Wed, 3 May 2017 11:16:42 +0100 From: Lorenzo Pieralisi To: Arnd Bergmann Subject: Re: [RFC/RFT PATCH 08/18] PCI: designware: Convert PCI scan API to pci_scan_root_bus_bridge() Message-ID: <20170503101642.GA10800@red-moon> References: <20170426111809.19922-1-lorenzo.pieralisi@arm.com> <20170426111809.19922-9-lorenzo.pieralisi@arm.com> MIME-Version: 1.0 In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wenrui Li , Gabriele Paoloni , linux-pci , Shawn Lin , Will Deacon , Michal Simek , Thierry Reding , Tanmay Inamdar , Matthew Minter , Rob Herring , Joao Pinto , Pratyush Anand , Russell King , Murali Karicheri , Bharat Kumar Gogada , Simon Horman , Bjorn Helgaas , Mingkai Hu , Linux ARM , Thomas Petazzoni , Jingoo Han , Stanimir Varbanov , Minghuan Lian , Zhou Wang , Roy Zang Content-Type: text/plain; charset="us-ascii" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+bjorn=helgaas.com@lists.infradead.org List-ID: On Fri, Apr 28, 2017 at 03:13:04PM +0200, Arnd Bergmann wrote: > On Wed, Apr 26, 2017 at 1:17 PM, Lorenzo Pieralisi > wrote: > > The introduction of pci_scan_root_bus_bridge() provides a PCI core > > API to scan a PCI root bus backed by an already initialized > > struct pci_host_bridge object, which simplifies the bus scan > > interface and makes the PCI scan root bus interface easier to > > generalize as members are added to the struct pci_host_bridge(). > > > > Convert PCI designware host code to pci_scan_root_bus_bridge() to > > improve the PCI root bus scanning interface. > > > > Signed-off-by: Lorenzo Pieralisi > > Cc: Jingoo Han > > Cc: Bjorn Helgaas > > Cc: Joao Pinto > > --- > > drivers/pci/dwc/pcie-designware-host.c | 36 +++++++++++++++++++++------------- > > 1 file changed, 22 insertions(+), 14 deletions(-) > > > > diff --git a/drivers/pci/dwc/pcie-designware-host.c b/drivers/pci/dwc/pcie-designware-host.c > > index 5ba3349..e43c21a 100644 > > --- a/drivers/pci/dwc/pcie-designware-host.c > > +++ b/drivers/pci/dwc/pcie-designware-host.c > > @@ -294,16 +294,21 @@ int dw_pcie_host_init(struct pcie_port *pp) > > dev_err(dev, "missing *config* reg space\n"); > > } > > > > - ret = of_pci_get_host_bridge_resources(np, 0, 0xff, &res, &pp->io_base); > > + bridge = pci_alloc_host_bridge(0); > > + if (!bridge) > > + return -ENOMEM; > > + > > I think here we warn to have the pci_alloc_host_bridge() called in the s/warn/want, correct ? > individual drivers, to have them allocate the dw_pcie structure as > part of the host bridge allocation, before calling > hisi_add_pcie_port(). I see what you mean I will see how I can do it with this series or another one, it won't certainly make this DW stuff any shinier, it is really really hard to read. Thanks, Lorenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel