2014-09-21 21:57:17 +00:00
|
|
|
From 6611afa6c49434780096cdf2c1028f0ac277f9bc Mon Sep 17 00:00:00 2001
|
2014-04-23 21:53:50 +00:00
|
|
|
From: Hauke Mehrtens <hauke@hauke-m.de>
|
|
|
|
Date: Thu, 9 Jan 2014 19:40:14 +0100
|
2014-09-21 21:57:17 +00:00
|
|
|
Subject: [PATCH v3 2/2] bcma: get IRQ numbers from dt
|
2014-04-23 21:53:50 +00:00
|
|
|
|
2014-08-24 15:57:49 +00:00
|
|
|
It is not possible to auto detect the irq numbers used by the cores on
|
|
|
|
an arm SoC. If bcma was registered with device tree it will search for
|
|
|
|
some device tree nodes with the irq number and add it to the core
|
|
|
|
configuration.
|
|
|
|
|
|
|
|
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
2014-04-23 21:53:50 +00:00
|
|
|
---
|
2014-09-21 21:57:17 +00:00
|
|
|
drivers/bcma/main.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++-
|
|
|
|
1 file changed, 48 insertions(+), 1 deletion(-)
|
|
|
|
|
2014-04-23 21:53:50 +00:00
|
|
|
--- a/drivers/bcma/main.c
|
|
|
|
+++ b/drivers/bcma/main.c
|
2014-10-01 13:37:36 +00:00
|
|
|
@@ -10,6 +10,7 @@
|
2014-04-23 21:53:50 +00:00
|
|
|
#include <linux/platform_device.h>
|
|
|
|
#include <linux/bcma/bcma.h>
|
|
|
|
#include <linux/slab.h>
|
|
|
|
+#include <linux/of_irq.h>
|
2014-10-01 13:37:36 +00:00
|
|
|
#include <linux/of_address.h>
|
2014-04-23 21:53:50 +00:00
|
|
|
|
|
|
|
MODULE_DESCRIPTION("Broadcom's specific AMBA driver");
|
2014-10-01 13:37:36 +00:00
|
|
|
@@ -159,8 +160,10 @@ static void bcma_of_fill_device(struct p
|
|
|
|
struct device_node *node;
|
2014-04-23 21:53:50 +00:00
|
|
|
|
2014-10-01 13:37:36 +00:00
|
|
|
node = bcma_of_find_child_device(parent, core);
|
|
|
|
- if (node)
|
|
|
|
- core->dev.of_node = node;
|
2014-04-23 21:53:50 +00:00
|
|
|
+ if (!node)
|
|
|
|
+ return;
|
|
|
|
+ core->dev.of_node = node;
|
|
|
|
+ core->irq = irq_of_parse_and_map(node, 0);
|
2014-10-01 13:37:36 +00:00
|
|
|
}
|
|
|
|
#else
|
|
|
|
static void bcma_of_fill_device(struct platform_device *parent,
|