From 874ec9cb7e2e94ec4167d3937db53da27115dd4d Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 29 Apr 2012 02:18:52 +0200 Subject: [PATCH] --- yaml --- r: 306755 b: refs/heads/master c: 2b2715b83c433d22b10bd654e102baea6f5589b0 h: refs/heads/master i: 306753: 6e2fadf275567e05606f2e306c78ecee8e52c559 306751: b644fd09d41e48616352b46e0e9ea069051092ef v: v3 --- [refs] | 2 +- trunk/drivers/bcma/driver_pci.c | 18 ++++++++++++++++++ trunk/include/linux/bcma/bcma_driver_pci.h | 4 ++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 95c36bfcde06..be99844f83b0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ec00f3732129e57206e9ef9883d681ad6584f5dd +refs/heads/master: 2b2715b83c433d22b10bd654e102baea6f5589b0 diff --git a/trunk/drivers/bcma/driver_pci.c b/trunk/drivers/bcma/driver_pci.c index 472d14fad643..9a96f14c8f47 100644 --- a/trunk/drivers/bcma/driver_pci.c +++ b/trunk/drivers/bcma/driver_pci.c @@ -186,6 +186,23 @@ static void bcma_core_pci_fixcfg(struct bcma_drv_pci *pc) } } +/* Fix MISC config to allow coming out of L2/L3-Ready state w/o PRST */ +/* Needs to happen when coming out of 'standby'/'hibernate' */ +static void bcma_core_pci_config_fixup(struct bcma_drv_pci *pc) +{ + u16 val16; + uint regoff; + + regoff = BCMA_CORE_PCI_SPROM(BCMA_CORE_PCI_SPROM_MISC_CONFIG); + + val16 = pcicore_read16(pc, regoff); + + if (!(val16 & BCMA_CORE_PCI_SPROM_L23READY_EXIT_NOPERST)) { + val16 |= BCMA_CORE_PCI_SPROM_L23READY_EXIT_NOPERST; + pcicore_write16(pc, regoff, val16); + } +} + /************************************************** * Init. **************************************************/ @@ -194,6 +211,7 @@ static void __devinit bcma_core_pci_clientmode_init(struct bcma_drv_pci *pc) { bcma_core_pci_fixcfg(pc); bcma_pcicore_serdes_workaround(pc); + bcma_core_pci_config_fixup(pc); } void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc) diff --git a/trunk/include/linux/bcma/bcma_driver_pci.h b/trunk/include/linux/bcma/bcma_driver_pci.h index 5b0542c336ed..41da581e1612 100644 --- a/trunk/include/linux/bcma/bcma_driver_pci.h +++ b/trunk/include/linux/bcma/bcma_driver_pci.h @@ -90,6 +90,10 @@ struct pci_dev; #define BCMA_CORE_PCI_SPROM_PI_OFFSET 0 /* first word */ #define BCMA_CORE_PCI_SPROM_PI_MASK 0xf000 /* bit 15:12 */ #define BCMA_CORE_PCI_SPROM_PI_SHIFT 12 /* bit 15:12 */ +#define BCMA_CORE_PCI_SPROM_MISC_CONFIG 5 /* word 5 */ +#define BCMA_CORE_PCI_SPROM_L23READY_EXIT_NOPERST 0x8000 /* bit 15 */ +#define BCMA_CORE_PCI_SPROM_CLKREQ_OFFSET_REV5 20 /* word 20 for srom rev <= 5 */ +#define BCMA_CORE_PCI_SPROM_CLKREQ_ENB 0x0800 /* bit 11 */ /* SBtoPCIx */ #define BCMA_CORE_PCI_SBTOPCI_MEM 0x00000000