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