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 @@ -247,7 +263,8 @@ void bcma_core_mips_early_init(struct bc
27 void bcma_core_mips_init(struct bcma_drv_mips *mcore)
30 - struct bcma_device *core;
33 bus = mcore->core->bus;
35 if (mcore->setup_done)
36 @@ -259,35 +276,44 @@ void bcma_core_mips_init(struct bcma_drv
38 mcore->assigned_irqs = 1;
40 - /* Assign IRQs to all cores on the bus */
41 - list_for_each_entry(core, &bus->cores, list) {
46 - mips_irq = bcma_core_mips_irq(core);
50 - core->irq = mips_irq + 2;
53 - switch (core->id.id) {
55 - case BCMA_CORE_PCIE:
56 - case BCMA_CORE_ETHERNET:
57 - case BCMA_CORE_ETHERNET_GBIT:
58 - case BCMA_CORE_MAC_GBIT:
59 - case BCMA_CORE_80211:
60 - case BCMA_CORE_USB20_HOST:
61 - /* These devices get their own IRQ line if available,
62 - * the rest goes on IRQ0
64 - if (mcore->assigned_irqs <= 4)
65 - bcma_core_mips_set_irq(core,
66 - mcore->assigned_irqs++);
69 + switch (bus->chipinfo.id) {
70 + case BCMA_CHIP_ID_BCM4716:
71 + case BCMA_CHIP_ID_BCM4748:
72 + bcma_core_mips_set_irq_name(bus, 1, BCMA_CORE_80211, 0);
73 + bcma_core_mips_set_irq_name(bus, 2, BCMA_CORE_MAC_GBIT, 0);
74 + bcma_core_mips_set_irq_name(bus, 3, BCMA_CORE_USB20_HOST, 0);
75 + bcma_core_mips_set_irq_name(bus, 4, BCMA_CORE_PCIE, 0);
76 + bcma_core_mips_set_irq_name(bus, 0, BCMA_CORE_CHIPCOMMON, 0);
77 + bcma_core_mips_set_irq_name(bus, 0, BCMA_CORE_I2S, 0);
79 + case BCMA_CHIP_ID_BCM5356:
80 + case BCMA_CHIP_ID_BCM47162:
81 + case BCMA_CHIP_ID_BCM53572:
82 + bcma_core_mips_set_irq_name(bus, 1, BCMA_CORE_80211, 0);
83 + bcma_core_mips_set_irq_name(bus, 2, BCMA_CORE_MAC_GBIT, 0);
84 + bcma_core_mips_set_irq_name(bus, 0, BCMA_CORE_CHIPCOMMON, 0);
86 + case BCMA_CHIP_ID_BCM5357:
87 + case BCMA_CHIP_ID_BCM4749:
88 + bcma_core_mips_set_irq_name(bus, 1, BCMA_CORE_80211, 0);
89 + bcma_core_mips_set_irq_name(bus, 2, BCMA_CORE_MAC_GBIT, 0);
90 + bcma_core_mips_set_irq_name(bus, 3, BCMA_CORE_USB20_HOST, 0);
91 + bcma_core_mips_set_irq_name(bus, 0, BCMA_CORE_CHIPCOMMON, 0);
92 + bcma_core_mips_set_irq_name(bus, 0, BCMA_CORE_I2S, 0);
94 + case BCMA_CHIP_ID_BCM4706:
95 + bcma_core_mips_set_irq_name(bus, 1, BCMA_CORE_PCIE, 0);
96 + bcma_core_mips_set_irq_name(bus, 2, BCMA_CORE_4706_MAC_GBIT,
98 + bcma_core_mips_set_irq_name(bus, 3, BCMA_CORE_PCIE, 1);
99 + bcma_core_mips_set_irq_name(bus, 4, BCMA_CORE_USB20_HOST, 0);
100 + bcma_core_mips_set_irq_name(bus, 0, BCMA_CORE_4706_CHIPCOMMON,
105 + "Unknown device (0x%x) found, can not configure IRQs\n",
108 bcma_info(bus, "IRQ reconfiguration done\n");
109 bcma_core_mips_dump_irq(bus);