Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351921
b: refs/heads/master
c: 6bf2e54
h: refs/heads/master
i:
  351919: 20a2388
v: v3
  • Loading branch information
Nathan Hintz authored and John W. Linville committed Jan 14, 2013
1 parent 39fa086 commit 173372b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e2d4a24e03f9f7b255e86a2537dca0927f08af4a
refs/heads/master: 6bf2e5461479c4511f59946a7378db576b04dbc5
28 changes: 28 additions & 0 deletions trunk/drivers/bcma/driver_mips.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,32 @@ void bcma_core_mips_early_init(struct bcma_drv_mips *mcore)
mcore->early_setup_done = true;
}

static void bcma_fix_i2s_irqflag(struct bcma_bus *bus)
{
struct bcma_device *cpu, *pcie, *i2s;

/* Fixup the interrupts in 4716/4748 for i2s core (2010 Broadcom SDK)
* (IRQ flags > 7 are ignored when setting the interrupt masks)
*/
if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4716 &&
bus->chipinfo.id != BCMA_CHIP_ID_BCM4748)
return;

cpu = bcma_find_core(bus, BCMA_CORE_MIPS_74K);
pcie = bcma_find_core(bus, BCMA_CORE_PCIE);
i2s = bcma_find_core(bus, BCMA_CORE_I2S);
if (cpu && pcie && i2s &&
bcma_aread32(cpu, BCMA_MIPS_OOBSELINA74) == 0x08060504 &&
bcma_aread32(pcie, BCMA_MIPS_OOBSELINA74) == 0x08060504 &&
bcma_aread32(i2s, BCMA_MIPS_OOBSELOUTA30) == 0x88) {
bcma_awrite32(cpu, BCMA_MIPS_OOBSELINA74, 0x07060504);
bcma_awrite32(pcie, BCMA_MIPS_OOBSELINA74, 0x07060504);
bcma_awrite32(i2s, BCMA_MIPS_OOBSELOUTA30, 0x87);
bcma_debug(bus,
"Moved i2s interrupt to oob line 7 instead of 8\n");
}
}

void bcma_core_mips_init(struct bcma_drv_mips *mcore)
{
struct bcma_bus *bus;
Expand All @@ -269,6 +295,8 @@ void bcma_core_mips_init(struct bcma_drv_mips *mcore)

bcma_core_mips_early_init(mcore);

bcma_fix_i2s_irqflag(bus);

switch (bus->chipinfo.id) {
case BCMA_CHIP_ID_BCM4716:
case BCMA_CHIP_ID_BCM4748:
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/bcma/bcma_driver_mips.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define BCMA_MIPS_MIPS74K_GPIOEN 0x0048
#define BCMA_MIPS_MIPS74K_CLKCTLST 0x01E0

#define BCMA_MIPS_OOBSELINA74 0x004
#define BCMA_MIPS_OOBSELOUTA30 0x100

struct bcma_device;
Expand Down

0 comments on commit 173372b

Please sign in to comment.