Thread (19 messages) 19 messages, 5 authors, 2011-10-03
STALE5355d
Revisions (14)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 [diff vs current]
  4. v1 [diff vs current]
  5. v1 [diff vs current]
  6. v2 [diff vs current]
  7. v2 [diff vs current]
  8. v2 [diff vs current]
  9. v2 [diff vs current]
  10. v3 [diff vs current]
  11. v4 [diff vs current]
  12. v4 current
  13. v4 [diff vs current]
  14. v5 [diff vs current]

[PATCH v4 6/7] arm/imx6q: add device tree machine support

From: Jamie Iles <hidden>
Date: 2011-09-30 09:01:56

Hi Shawn,

On Wed, Sep 28, 2011 at 05:06:47PM +0800, Shawn Guo wrote:
It adds generic device tree based machine support for imx6q.

Signed-off-by: Shawn Guo <redacted>
---
[...]
quoted hunk ↗ jump to hunk
diff --git a/arch/arm/mach-imx/mach-imx6q.c 
b/arch/arm/mach-imx/mach-imx6q.c
new file mode 100644
index 0000000..8bf5fa3
--- /dev/null
+++ b/arch/arm/mach-imx/mach-imx6q.c
[...]
+static void __init imx6q_gpio_add_irq_domain(struct device_node *np,
+				struct device_node *interrupt_parent)
+{
+	static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS -
+				   32 * 7; /* imx6q gets 7 gpio ports */
+
+	irq_domain_add_simple(np, gpio_irq_base);
+	gpio_irq_base += 32;
Doesn't this rely on imx6q_gpio_add_irq_domain() being called for each 
gpio bank in the order that they appear in the device tree (and that the 
dt is correctly ordered)?
+}
+
+static const struct of_device_id imx6q_irq_match[] __initconst = {
+	{ .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
+	{ .compatible = "fsl,imx6q-gpio", .data = imx6q_gpio_add_irq_domain, },
+	{ /* sentinel */ }
+};
+
+static void __init imx6q_init_irq(void)
+{
+	l2x0_of_init(0, ~0UL);
+	imx_src_init();
+	imx_gpc_init();
+	of_irq_init(imx6q_irq_match);
+}
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