aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bcma')
-rw-r--r--drivers/bcma/driver_mips.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c
index a808404db4b1..9fe86ee16c66 100644
--- a/drivers/bcma/driver_mips.c
+++ b/drivers/bcma/driver_mips.c
@@ -256,6 +256,32 @@ void bcma_core_mips_early_init(struct bcma_drv_mips *mcore)
256 mcore->early_setup_done = true; 256 mcore->early_setup_done = true;
257} 257}
258 258
259static void bcma_fix_i2s_irqflag(struct bcma_bus *bus)
260{
261 struct bcma_device *cpu, *pcie, *i2s;
262
263 /* Fixup the interrupts in 4716/4748 for i2s core (2010 Broadcom SDK)
264 * (IRQ flags > 7 are ignored when setting the interrupt masks)
265 */
266 if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4716 &&
267 bus->chipinfo.id != BCMA_CHIP_ID_BCM4748)
268 return;
269
270 cpu = bcma_find_core(bus, BCMA_CORE_MIPS_74K);
271 pcie = bcma_find_core(bus, BCMA_CORE_PCIE);
272 i2s = bcma_find_core(bus, BCMA_CORE_I2S);
273 if (cpu && pcie && i2s &&
274 bcma_aread32(cpu, BCMA_MIPS_OOBSELINA74) == 0x08060504 &&
275 bcma_aread32(pcie, BCMA_MIPS_OOBSELINA74) == 0x08060504 &&
276 bcma_aread32(i2s, BCMA_MIPS_OOBSELOUTA30) == 0x88) {
277 bcma_awrite32(cpu, BCMA_MIPS_OOBSELINA74, 0x07060504);
278 bcma_awrite32(pcie, BCMA_MIPS_OOBSELINA74, 0x07060504);
279 bcma_awrite32(i2s, BCMA_MIPS_OOBSELOUTA30, 0x87);
280 bcma_debug(bus,
281 "Moved i2s interrupt to oob line 7 instead of 8\n");
282 }
283}
284
259void bcma_core_mips_init(struct bcma_drv_mips *mcore) 285void bcma_core_mips_init(struct bcma_drv_mips *mcore)
260{ 286{
261 struct bcma_bus *bus; 287 struct bcma_bus *bus;
@@ -269,6 +295,8 @@ void bcma_core_mips_init(struct bcma_drv_mips *mcore)
269 295
270 bcma_core_mips_early_init(mcore); 296 bcma_core_mips_early_init(mcore);
271 297
298 bcma_fix_i2s_irqflag(bus);
299
272 switch (bus->chipinfo.id) { 300 switch (bus->chipinfo.id) {
273 case BCMA_CHIP_ID_BCM4716: 301 case BCMA_CHIP_ID_BCM4716:
274 case BCMA_CHIP_ID_BCM4748: 302 case BCMA_CHIP_ID_BCM4748: