driver_pci.c (ec00f3732129e57206e9ef9883d681ad6584f5dd) driver_pci.c (2b2715b83c433d22b10bd654e102baea6f5589b0)
1/*
2 * Broadcom specific AMBA
3 * PCI Core
4 *
5 * Copyright 2005, 2011, Broadcom Corporation
6 * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
7 * Copyright 2011, 2012, Hauke Mehrtens <hauke@hauke-m.de>
8 *

--- 172 unchanged lines hidden (view full) ---

181 if (((val16 & BCMA_CORE_PCI_SPROM_PI_MASK) >> BCMA_CORE_PCI_SPROM_PI_SHIFT)
182 != core_index) {
183 val16 = (core_index << BCMA_CORE_PCI_SPROM_PI_SHIFT) |
184 (val16 & ~BCMA_CORE_PCI_SPROM_PI_MASK);
185 pcicore_write16(pc, regoff, val16);
186 }
187}
188
1/*
2 * Broadcom specific AMBA
3 * PCI Core
4 *
5 * Copyright 2005, 2011, Broadcom Corporation
6 * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
7 * Copyright 2011, 2012, Hauke Mehrtens <hauke@hauke-m.de>
8 *

--- 172 unchanged lines hidden (view full) ---

181 if (((val16 & BCMA_CORE_PCI_SPROM_PI_MASK) >> BCMA_CORE_PCI_SPROM_PI_SHIFT)
182 != core_index) {
183 val16 = (core_index << BCMA_CORE_PCI_SPROM_PI_SHIFT) |
184 (val16 & ~BCMA_CORE_PCI_SPROM_PI_MASK);
185 pcicore_write16(pc, regoff, val16);
186 }
187}
188
189/* Fix MISC config to allow coming out of L2/L3-Ready state w/o PRST */
190/* Needs to happen when coming out of 'standby'/'hibernate' */
191static void bcma_core_pci_config_fixup(struct bcma_drv_pci *pc)
192{
193 u16 val16;
194 uint regoff;
195
196 regoff = BCMA_CORE_PCI_SPROM(BCMA_CORE_PCI_SPROM_MISC_CONFIG);
197
198 val16 = pcicore_read16(pc, regoff);
199
200 if (!(val16 & BCMA_CORE_PCI_SPROM_L23READY_EXIT_NOPERST)) {
201 val16 |= BCMA_CORE_PCI_SPROM_L23READY_EXIT_NOPERST;
202 pcicore_write16(pc, regoff, val16);
203 }
204}
205
189/**************************************************
190 * Init.
191 **************************************************/
192
193static void __devinit bcma_core_pci_clientmode_init(struct bcma_drv_pci *pc)
194{
195 bcma_core_pci_fixcfg(pc);
196 bcma_pcicore_serdes_workaround(pc);
206/**************************************************
207 * Init.
208 **************************************************/
209
210static void __devinit bcma_core_pci_clientmode_init(struct bcma_drv_pci *pc)
211{
212 bcma_core_pci_fixcfg(pc);
213 bcma_pcicore_serdes_workaround(pc);
214 bcma_core_pci_config_fixup(pc);
197}
198
199void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc)
200{
201 if (pc->setup_done)
202 return;
203
204#ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE

--- 53 unchanged lines hidden ---
215}
216
217void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc)
218{
219 if (pc->setup_done)
220 return;
221
222#ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE

--- 53 unchanged lines hidden ---