1 --- a/drivers/bcma/driver_mips.c
2 +++ b/drivers/bcma/driver_mips.c
3 @@ -148,6 +148,22 @@ static void bcma_core_mips_set_irq(struc
4 dev->id.id, oldirq + 2, irq + 2);
7 +static void bcma_core_mips_set_irq_name(struct bcma_bus *bus, unsigned int irq,
10 + struct bcma_device *core;
12 + core = bcma_find_core_unit(bus, coreid, unit);
15 + "Can not find core (id: 0x%x, unit %i) for IRQ configuration.\n",
20 + bcma_core_mips_set_irq(core, irq);
23 static void bcma_core_mips_print_irq(struct bcma_device *dev, unsigned int irq)
26 @@ -259,35 +275,47 @@ void bcma_core_mips_init(struct bcma_drv
28 mcore->assigned_irqs = 1;
30 - /* Assign IRQs to all cores on the bus */
31 - list_for_each_entry(core, &bus->cores, list) {
36 - mips_irq = bcma_core_mips_irq(core);
40 - core->irq = mips_irq + 2;
43 - switch (core->id.id) {
45 - case BCMA_CORE_PCIE:
46 - case BCMA_CORE_ETHERNET:
47 - case BCMA_CORE_ETHERNET_GBIT:
48 - case BCMA_CORE_MAC_GBIT:
49 - case BCMA_CORE_80211:
50 - case BCMA_CORE_USB20_HOST:
51 - /* These devices get their own IRQ line if available,
52 - * the rest goes on IRQ0
54 - if (mcore->assigned_irqs <= 4)
55 - bcma_core_mips_set_irq(core,
56 - mcore->assigned_irqs++);
58 + switch (bus->chipinfo.id) {
59 + case BCMA_CHIP_ID_BCM4716:
60 + case BCMA_CHIP_ID_BCM4748:
61 + bcma_core_mips_set_irq_name(bus, 1, BCMA_CORE_80211, 0);
62 + bcma_core_mips_set_irq_name(bus, 2, BCMA_CORE_MAC_GBIT, 0);
63 + bcma_core_mips_set_irq_name(bus, 3, BCMA_CORE_USB20_HOST, 0);
64 + bcma_core_mips_set_irq_name(bus, 4, BCMA_CORE_PCIE, 0);
65 + bcma_core_mips_set_irq_name(bus, 0, BCMA_CORE_CHIPCOMMON, 0);
66 + bcma_core_mips_set_irq_name(bus, 0, BCMA_CORE_I2S, 0);
68 + case BCMA_CHIP_ID_BCM5356:
69 + case BCMA_CHIP_ID_BCM47162:
70 + case BCMA_CHIP_ID_BCM53572:
71 + bcma_core_mips_set_irq_name(bus, 1, BCMA_CORE_80211, 0);
72 + bcma_core_mips_set_irq_name(bus, 2, BCMA_CORE_MAC_GBIT, 0);
73 + bcma_core_mips_set_irq_name(bus, 0, BCMA_CORE_CHIPCOMMON, 0);
75 + case BCMA_CHIP_ID_BCM5357:
76 + case BCMA_CHIP_ID_BCM4749:
77 + bcma_core_mips_set_irq_name(bus, 1, BCMA_CORE_80211, 0);
78 + bcma_core_mips_set_irq_name(bus, 2, BCMA_CORE_MAC_GBIT, 0);
79 + bcma_core_mips_set_irq_name(bus, 3, BCMA_CORE_USB20_HOST, 0);
80 + bcma_core_mips_set_irq_name(bus, 0, BCMA_CORE_CHIPCOMMON, 0);
81 + bcma_core_mips_set_irq_name(bus, 0, BCMA_CORE_I2S, 0);
83 + case BCMA_CHIP_ID_BCM4706:
84 + bcma_core_mips_set_irq_name(bus, 1, BCMA_CORE_PCIE, 0);
85 + bcma_core_mips_set_irq_name(bus, 2, BCMA_CORE_4706_MAC_GBIT,
87 + bcma_core_mips_set_irq_name(bus, 3, BCMA_CORE_PCIE, 1);
88 + bcma_core_mips_set_irq_name(bus, 4, BCMA_CORE_USB20_HOST, 0);
89 + bcma_core_mips_set_irq_name(bus, 0, BCMA_CORE_4706_CHIPCOMMON,
93 + list_for_each_entry(core, &bus->cores, list) {
94 + core->irq = bcma_core_irq(core);
97 + "Unknown device (0x%x) found, can not configure IRQs\n",
100 bcma_info(bus, "IRQ reconfiguration done\n");
101 bcma_core_mips_dump_irq(bus);