Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rafał Miłecki and committed by
Kalle Valo
8be08a39 b504075f

+7 -2
+4 -2
drivers/bcma/host_pci.c
··· 13 13 14 14 static void bcma_host_pci_switch_core(struct bcma_device *core) 15 15 { 16 + int win2 = core->bus->host_is_pcie2 ? 17 + BCMA_PCIE2_BAR0_WIN2 : BCMA_PCI_BAR0_WIN2; 18 + 16 19 pci_write_config_dword(core->bus->host_pci, BCMA_PCI_BAR0_WIN, 17 20 core->addr); 18 - pci_write_config_dword(core->bus->host_pci, BCMA_PCI_BAR0_WIN2, 19 - core->wrap); 21 + pci_write_config_dword(core->bus->host_pci, win2, core->wrap); 20 22 core->bus->mapped_core = core; 21 23 bcma_debug(core->bus, "Switched to core: 0x%X\n", core->id.id); 22 24 }
+1
include/linux/bcma/bcma.h
··· 318 318 const struct bcma_host_ops *ops; 319 319 320 320 enum bcma_hosttype hosttype; 321 + bool host_is_pcie2; /* Used for BCMA_HOSTTYPE_PCI only */ 321 322 union { 322 323 /* Pointer to the PCI bus (only for BCMA_HOSTTYPE_PCI) */ 323 324 struct pci_dev *host_pci;
+2
include/linux/bcma/bcma_regs.h
··· 64 64 #define BCMA_PCI_GPIO_XTAL 0x40 /* PCI config space GPIO 14 for Xtal powerup */ 65 65 #define BCMA_PCI_GPIO_PLL 0x80 /* PCI config space GPIO 15 for PLL powerdown */ 66 66 67 + #define BCMA_PCIE2_BAR0_WIN2 0x70 68 + 67 69 /* SiliconBackplane Address Map. 68 70 * All regions may not exist on all chips. 69 71 */