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

saeed bishara saeed.bishara at gmail.com
Wed Jun 2 06:34:18 EDT 2010


> 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, 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?



More information about the linux-arm-kernel mailing list