[03/12,v3] pci: fsl: add PCI indirect access support

Scott Wood scottwood at freescale.com
Tue Jan 7 18:13:49 EST 2014

On Mon, 2014-01-06 at 13:36 +0800, Lian Minghuan-b31939 wrote:
> HI Scott,
> please see my comments inline.
> On 01/04/2014 06:33 AM, Scott Wood wrote:
> > A lot of this seems duplicated from arch/powerpc/sysdev/indirect_pci.c.
> >
> > How generally applicable is that file to non-PPC implementations?  At a
> > minimum I see a similar file in arch/microblaze.  It should probably
> > eventually be moved to common code, rather than duplicated again.  A
> > prerequisite for that would be making common the dependencies it has on
> > the rest of what is currently arch PCI infrastructure; until then, it's
> > probably better to just have the common fsl-pci code know how to
> > interface with the appropriate PPC/ARM code rather than trying to copy
> > the infrastructure as well.
> [Minghuan] Yes, This is a duplicate except it uses struct fsl_pci. But 
> it is hard to be move to common code.
> because every indirect read/write functions use different PCI controller 
> structure which is very basic structure and ARM has no this structure.
> If we can not establish a unified pci controller structure, we can only 
> abstract out a simple structure which includes indirect access related 
> fields,
> and need a callback function to get the pointer like this: 
> ((powerpc/microblaze/mips/ pci_controller 
> *)(pci_bus->sysdata))->indirect_struct.
> Should we provide the common code for indirect access API or wait for 
> the common PCI controller structure?

Either work with the PCI maintainer to come up with a common structure,
or leave the code where it is and call into it.


More information about the Linuxppc-dev mailing list