aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma/driver_mips.c
diff options
context:
space:
mode:
authorNathan Hintz <nlhintz@hotmail.com>2013-01-12 01:07:22 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-01-14 15:10:40 -0500
commit6bf2e5461479c4511f59946a7378db576b04dbc5 (patch)
tree5f0560d8cd248efdaff9d12e2b9c4dec1df32806 /drivers/bcma/driver_mips.c
parente2d4a24e03f9f7b255e86a2537dca0927f08af4a (diff)
bcma: fix bcm4716/bcm4748 i2s irqflag
The default irqflag assignment for the I2S core on some Broadcom 4716/4748 devices is invalid and needs to be corrected (from the Broadcom SDK). Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/driver_mips.c')
-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: