200-pci_designware_add-ability-for-custom-swizzle.patch 987 B

123456789101112131415161718192021222324252627282930313233
  1. commit e84634dc6c7f3f6af9b8ef1fb36f0d85c476ab95
  2. Author: Tim Harvey <tharvey@gateworks.com>
  3. Date: Thu Feb 27 01:02:23 2014 -0800
  4. PCI: designware: add ability for custom swizzle
  5. Add the ability for a platform driver to provide a platform-specific
  6. swizzle function.
  7. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
  8. --- a/drivers/pci/host/pcie-designware.c
  9. +++ b/drivers/pci/host/pcie-designware.c
  10. @@ -492,6 +492,9 @@ int dw_pcie_host_init(struct pcie_port *
  11. if (pp->ops->host_init)
  12. pp->ops->host_init(pp);
  13. + if (pp->swizzle)
  14. + dw_pci.swizzle = pp->swizzle;
  15. +
  16. dw_pcie_wr_own_conf(pp, PCI_BASE_ADDRESS_0, 4, 0);
  17. /* program correct class for RC */
  18. --- a/drivers/pci/host/pcie-designware.h
  19. +++ b/drivers/pci/host/pcie-designware.h
  20. @@ -53,6 +53,7 @@ struct pcie_port {
  21. struct irq_domain *irq_domain;
  22. unsigned long msi_data;
  23. DECLARE_BITMAP(msi_irq_in_use, MAX_MSI_IRQS);
  24. + u8 (*swizzle)(struct pci_dev *, u8 *);
  25. };
  26. struct pcie_host_ops {