Re: [PATCH 3/3] [RFC] pci: tegra: use new pci_register_host interface

From: Thierry Reding
Date: Mon May 02 2016 - 03:19:26 EST


On Sat, Apr 30, 2016 at 01:01:39AM +0200, Arnd Bergmann wrote:
> Tegra is one of the remaining platforms that still use the
> traditional pci_common_init_dev() interface for probing PCI
> host bridges.
>
> This demonstrates how to convert it to the pci_register_host
> interface I just added in a previous patch. This leads to
> a more linear probe sequence that can handle errors better
> because we avoid callbacks into the driver, and it makes
> the driver architecture independent.
>
> As a side note, I should mention that I noticed this driver
> does not register any IORESOURCE_IO resource with the bus,
> but instead registers the I/O port window as a memory
> resource, which is surely a bug.

How's that? I thought pci_add_resource_offset() was exactly what was
registering the I/O resource, using the resource's flags to determine
what type to register. Do we have to use a different API to register an
I/O resource in particular?

Overall this change looks really good. How do you want to proceed with
the series? Would it be helpful if I picked up this patch and submit it
to Bjorn for v4.8, provided that the core changes make it in?

Thierry

Attachment: signature.asc
Description: PGP signature