summaryrefslogtreecommitdiffstats
path: root/drivers/bcma
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2015-01-25 13:41:19 +0100
committerKalle Valo <kvalo@codeaurora.org>2015-01-29 10:54:43 +0200
commit8be08a39d498d5d93ff5149276e34ccb4ec3757f (patch)
tree9c78047b907bb21e9eb0e5ee6cfece01190e8c07 /drivers/bcma
parentb504075f5903b969a54ef3a6ae994c0872edb259 (diff)
downloadop-kernel-dev-8be08a39d498d5d93ff5149276e34ccb4ec3757f.zip
op-kernel-dev-8be08a39d498d5d93ff5149276e34ccb4ec3757f.tar.gz
bcma: implement host code support for PCIe Gen 2 devices
This is stil incomplete, so we don't add PCI IDs of new devices yet. Purpose of this patch is to allow testing & adjusting rest of the code. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/bcma')
-rw-r--r--drivers/bcma/host_pci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
index cd9161a..53c6a8a 100644
--- a/drivers/bcma/host_pci.c
+++ b/drivers/bcma/host_pci.c
@@ -13,10 +13,12 @@
static void bcma_host_pci_switch_core(struct bcma_device *core)
{
+ int win2 = core->bus->host_is_pcie2 ?
+ BCMA_PCIE2_BAR0_WIN2 : BCMA_PCI_BAR0_WIN2;
+
pci_write_config_dword(core->bus->host_pci, BCMA_PCI_BAR0_WIN,
core->addr);
- pci_write_config_dword(core->bus->host_pci, BCMA_PCI_BAR0_WIN2,
- core->wrap);
+ pci_write_config_dword(core->bus->host_pci, win2, core->wrap);
core->bus->mapped_core = core;
bcma_debug(core->bus, "Switched to core: 0x%X\n", core->id.id);
}
OpenPOWER on IntegriCloud