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

bcma: update pci configuration for bcm4706/bcm4716

Update the PCI configuration for BCM4706 and BCM4716 per the 2011
Broadcom SDK.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Nathan Hintz and committed by
John W. Linville
990debe2 eab6d792

+14 -1
+12 -1
drivers/bcma/driver_pci_host.c
··· 427 427 /* Reset RC */ 428 428 usleep_range(3000, 5000); 429 429 pcicore_write32(pc, BCMA_CORE_PCI_CTL, BCMA_CORE_PCI_CTL_RST_OE); 430 - usleep_range(1000, 2000); 430 + msleep(50); 431 431 pcicore_write32(pc, BCMA_CORE_PCI_CTL, BCMA_CORE_PCI_CTL_RST | 432 432 BCMA_CORE_PCI_CTL_RST_OE); 433 433 ··· 488 488 msleep(100); 489 489 490 490 bcma_core_pci_enable_crs(pc); 491 + 492 + if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4706 || 493 + bus->chipinfo.id == BCMA_CHIP_ID_BCM4716) { 494 + u16 val16; 495 + bcma_extpci_read_config(pc, 0, 0, BCMA_CORE_PCI_CFG_DEVCTRL, 496 + &val16, sizeof(val16)); 497 + val16 |= (2 << 5); /* Max payload size of 512 */ 498 + val16 |= (2 << 12); /* MRRS 512 */ 499 + bcma_extpci_write_config(pc, 0, 0, BCMA_CORE_PCI_CFG_DEVCTRL, 500 + &val16, sizeof(val16)); 501 + } 491 502 492 503 /* Enable PCI bridge BAR0 memory & master access */ 493 504 tmp = PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
+2
include/linux/bcma/bcma_driver_pci.h
··· 179 179 #define BCMA_CORE_PCI_CFG_FUN_MASK 7 /* Function mask */ 180 180 #define BCMA_CORE_PCI_CFG_OFF_MASK 0xfff /* Register mask */ 181 181 182 + #define BCMA_CORE_PCI_CFG_DEVCTRL 0xd8 183 + 182 184 /* PCIE Root Capability Register bits (Host mode only) */ 183 185 #define BCMA_CORE_PCI_RC_CRS_VISIBILITY 0x0001 184 186