aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bcma/main.c')
-rw-r--r--drivers/bcma/main.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 9b229c9c35e5..6d1cf5701452 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -169,6 +169,28 @@ static void bcma_of_fill_device(struct platform_device *parent,
}
#endif /* CONFIG_OF */
+unsigned int bcma_core_irq(struct bcma_device *core, int num)
+{
+ struct bcma_bus *bus = core->bus;
+ unsigned int mips_irq;
+
+ switch (bus->hosttype) {
+ case BCMA_HOSTTYPE_PCI:
+ return bus->host_pci->irq;
+ case BCMA_HOSTTYPE_SOC:
+ if (bus->drv_mips.core && num == 0) {
+ mips_irq = bcma_core_mips_irq(core);
+ return mips_irq <= 4 ? mips_irq + 2 : 0;
+ }
+ break;
+ case BCMA_HOSTTYPE_SDIO:
+ return 0;
+ }
+
+ return 0;
+}
+EXPORT_SYMBOL(bcma_core_irq);
+
void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core)
{
core->dev.release = bcma_release_core_dev;