diff options
Diffstat (limited to 'drivers/bcma')
-rw-r--r-- | drivers/bcma/driver_pci.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c index 949206674dc8..472d14fad643 100644 --- a/drivers/bcma/driver_pci.c +++ b/drivers/bcma/driver_pci.c | |||
@@ -168,12 +168,31 @@ static void bcma_pcicore_serdes_workaround(struct bcma_drv_pci *pc) | |||
168 | tmp & ~BCMA_CORE_PCI_PLL_CTRL_FREQDET_EN); | 168 | tmp & ~BCMA_CORE_PCI_PLL_CTRL_FREQDET_EN); |
169 | } | 169 | } |
170 | 170 | ||
171 | static void bcma_core_pci_fixcfg(struct bcma_drv_pci *pc) | ||
172 | { | ||
173 | struct bcma_device *core = pc->core; | ||
174 | u16 val16, core_index; | ||
175 | uint regoff; | ||
176 | |||
177 | regoff = BCMA_CORE_PCI_SPROM(BCMA_CORE_PCI_SPROM_PI_OFFSET); | ||
178 | core_index = (u16)core->core_index; | ||
179 | |||
180 | val16 = pcicore_read16(pc, regoff); | ||
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 | |||
171 | /************************************************** | 189 | /************************************************** |
172 | * Init. | 190 | * Init. |
173 | **************************************************/ | 191 | **************************************************/ |
174 | 192 | ||
175 | static void __devinit bcma_core_pci_clientmode_init(struct bcma_drv_pci *pc) | 193 | static void __devinit bcma_core_pci_clientmode_init(struct bcma_drv_pci *pc) |
176 | { | 194 | { |
195 | bcma_core_pci_fixcfg(pc); | ||
177 | bcma_pcicore_serdes_workaround(pc); | 196 | bcma_pcicore_serdes_workaround(pc); |
178 | } | 197 | } |
179 | 198 | ||