From 585e11d4710644de338241357bbca37be084fcbc Mon Sep 17 00:00:00 2001 From: Nathan Hintz Date: Thu, 10 Jan 2013 22:24:03 -0800 Subject: [PATCH] --- yaml --- r: 351871 b: refs/heads/master c: 990debe2ca8379863709721926550a55f47f3880 h: refs/heads/master i: 351869: 16e67b76a1176dde436828b10885bf0445d05142 351867: 10c7dff74f1ce2665b07e580ba420fb68755a5e6 351863: 9e9438211eba3a8cf3e10205e5cedc10c99a3637 351855: 35fb3a77c0bd08e8d09e8ab314bbac5605045699 351839: 773f441e1b78eff844414ca9a4d491917e6c0c8c 351807: 6c6f5a9de6756aafeb3a8b17f2cf83d68537aa2a 351743: b06b4f0dccb748980b8323472394f4a899ec3825 v: v3 --- [refs] | 2 +- trunk/drivers/bcma/driver_pci_host.c | 13 ++++++++++++- trunk/include/linux/bcma/bcma_driver_pci.h | 2 ++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 2b1bd7d681c5..c9d9ace94b45 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: eab6d7921d5704128c941d7cc647dacd4d50697c +refs/heads/master: 990debe2ca8379863709721926550a55f47f3880 diff --git a/trunk/drivers/bcma/driver_pci_host.c b/trunk/drivers/bcma/driver_pci_host.c index ef9f0938da77..37d1777dcd47 100644 --- a/trunk/drivers/bcma/driver_pci_host.c +++ b/trunk/drivers/bcma/driver_pci_host.c @@ -427,7 +427,7 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc) /* Reset RC */ usleep_range(3000, 5000); pcicore_write32(pc, BCMA_CORE_PCI_CTL, BCMA_CORE_PCI_CTL_RST_OE); - usleep_range(1000, 2000); + msleep(50); pcicore_write32(pc, BCMA_CORE_PCI_CTL, BCMA_CORE_PCI_CTL_RST | BCMA_CORE_PCI_CTL_RST_OE); @@ -489,6 +489,17 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc) bcma_core_pci_enable_crs(pc); + if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4706 || + bus->chipinfo.id == BCMA_CHIP_ID_BCM4716) { + u16 val16; + bcma_extpci_read_config(pc, 0, 0, BCMA_CORE_PCI_CFG_DEVCTRL, + &val16, sizeof(val16)); + val16 |= (2 << 5); /* Max payload size of 512 */ + val16 |= (2 << 12); /* MRRS 512 */ + bcma_extpci_write_config(pc, 0, 0, BCMA_CORE_PCI_CFG_DEVCTRL, + &val16, sizeof(val16)); + } + /* Enable PCI bridge BAR0 memory & master access */ tmp = PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY; bcma_extpci_write_config(pc, 0, 0, PCI_COMMAND, &tmp, sizeof(tmp)); diff --git a/trunk/include/linux/bcma/bcma_driver_pci.h b/trunk/include/linux/bcma/bcma_driver_pci.h index 41da581e1612..31232247a1ee 100644 --- a/trunk/include/linux/bcma/bcma_driver_pci.h +++ b/trunk/include/linux/bcma/bcma_driver_pci.h @@ -179,6 +179,8 @@ struct pci_dev; #define BCMA_CORE_PCI_CFG_FUN_MASK 7 /* Function mask */ #define BCMA_CORE_PCI_CFG_OFF_MASK 0xfff /* Register mask */ +#define BCMA_CORE_PCI_CFG_DEVCTRL 0xd8 + /* PCIE Root Capability Register bits (Host mode only) */ #define BCMA_CORE_PCI_RC_CRS_VISIBILITY 0x0001