diff options
author | Gustavo Pimentel <gustavo.pimentel@synopsys.com> | 2018-05-15 17:41:42 +0300 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2018-05-15 17:51:38 +0300 |
commit | 1d906b22076e12cf6557cf4658defe82c0b5ff1f (patch) | |
tree | b0f42753dd1629a368633fecf353d1645d1fcaee /drivers/pci/endpoint/functions | |
parent | 467c7a7376421176ac248d93c65182847001cfbd (diff) | |
download | linux-1d906b22076e12cf6557cf4658defe82c0b5ff1f.tar.xz |
PCI: dwc: Add support for EP mode
The PCIe controller dual mode is capable of operating in Root Complex
(RC) mode as well as EP mode by configuration option.
Add EP support to the DesignWare driver on top of RC mode support.
Add new property on pci_epc structure which allow to configure
pci_epf_test driver accordingly to the controller specific requirements.
Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/pci/endpoint/functions')
-rw-r--r-- | drivers/pci/endpoint/functions/pci-epf-test.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c index 7cef85124325..bee401d99217 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -435,6 +435,13 @@ static int pci_epf_test_bind(struct pci_epf *epf) if (WARN_ON_ONCE(!epc)) return -EINVAL; + if (epc->features & EPC_FEATURE_NO_LINKUP_NOTIFIER) + epf_test->linkup_notifier = false; + else + epf_test->linkup_notifier = true; + + epf_test->test_reg_bar = EPC_FEATURE_GET_BAR(epc->features); + ret = pci_epc_write_header(epc, epf->func_no, header); if (ret) { dev_err(dev, "configuration header write failed\n"); |