[PATCH 3/3] [ARM] Kirkwood: add support for PCIe1

Nicolas Pitre nico at fluxnic.net
Wed Jun 2 15:29:58 EDT 2010


On Wed, 2 Jun 2010, saeed bishara wrote:

> > I think this looks like a bit too much code for what this does.  To
> > simplify things, you could:
> >
> > 1) Duplicate kirkwood_pcie_setup() into kirkwood_pcie0_setup() and
> >   kirkwood_pcie1_setup() instead.  This will remove a couple
> >   "if (pp->index == 0)" and the snprintf() which could remain
> >   purely static initializations.
> >
> > 2) Remove bus_to_port() entirely, and store the address of the appropriate
> >   struct pcie_port instance into the sysdata pointer of the pci_bus
> >   structure.  This struct pcie_port could even be kmalloc'd as needed.
> The sysdata already used by arm to store the pci_sys_data,

Ah, you're right.

> I think we will have to add a private pointer to the pci_sys_data 
> structure, that pointer will hold mach specific data per pci 
> controller. this pointer is needed for any platform that has multiple 
> pci controller. agree?

Yes.


Nicolas


More information about the linux-arm-kernel mailing list