Thread (3 messages) flat view 3 messages, 3 authors, 2011-11-10

[PATCHv4 02/13] ARM: vic: device tree binding

From: Jamie Iles <hidden>
Date: 2011-11-10 14:46:48
Also in: linux-devicetree

On Fri, Nov 04, 2011 at 01:09:59AM +0000, Jamie Iles wrote:
quoted hunk
This adds a device tree binding for the VIC based on the of_irq_init()
support.  This adds an irqdomain to the vic and always registers all
vics in the static vic array rather than for pm only to keep track of
the irq domain.  struct irq_data::hwirq is used where appropriate rather
than runtime masking.

v2:	- use irq_domain_simple_ops
	- remove stub implementation of vic_of_init for !CONFIG_OF
	- Make VIC select IRQ_DOMAIN

Reviewed-by: Rob Herring <redacted>
Reviewed-by: Grant Likely <redacted>
Signed-off-by: Jamie Iles <redacted>
---
 Documentation/devicetree/bindings/arm/vic.txt |   29 +++++++
 arch/arm/common/Kconfig                       |    1 +
 arch/arm/common/vic.c                         |  106 ++++++++++++++++++-------
 arch/arm/include/asm/hardware/vic.h           |    7 ++-
 4 files changed, 114 insertions(+), 29 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/vic.txt
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
index 01f18a4..e689975 100644
--- a/arch/arm/common/vic.c
+++ b/arch/arm/common/vic.c
@@ -22,6 +22,10 @@
[...]
+#ifdef CONFIG_OF
+int __init vic_of_init(struct device_node *node, struct device_node *parent)
+{
+	void __iomem *regs;
+	int irq_base;
+
+	if (WARN(parent, "non-root VICs are not supported"))
+		return -EINVAL;
+
+	regs = of_iomap(node, 0);
+	if (WARN_ON(!regs))
+		return -EIO;
+
+	irq_base = irq_alloc_descs(-1, 0, 32, numa_node_id());
+	if (WARN_ON(irq_base < 0))
+		goto out_unmap;
Hmm, this appears to need linux/export.h for THIS_MODULE now.  
linux/irq.h has a comment saying it uses a macro to avoid needing an 
include of export.h there so I guess it needs to go in here instead.

Jamie
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help