Re: [PATCH 6/8] arm: vt8500: Update arch-vt8500 to devicetree support.

From
Stephen Warren <hidden>
Date
2012-08-08 18:59:04
Also in
linux-arm-kernel, linux-devicetree, linux-serial, lkml
Reply to
Tony Prisk, 2012-08-08
On 08/07/2012 07:39 PM, Tony Prisk wrote:
Merged existing board files to a single dt-capable file.
Converted irq and timer code to devicetree.
Removed existing device files that are no longer required with
devicetree support.

All existing platform devices are converted to devicetree nodes
except GPIO and PWM.
Perhaps that also explains what I was commenting on in the GPIO driver
patch. Why not convert GPIO too?
quoted hunk ↗ jump to hunk
diff --git a/arch/arm/mach-vt8500/irq.c b/arch/arm/mach-vt8500/irq.c
quoted hunk ↗ jump to hunk
 /*
- *  arch/arm/mach-vt8500/irq.c
+ *  arch/arm/mach-vt8500/irq_dt.c
This file didn't get renamed?
quoted hunk ↗ jump to hunk
diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c
quoted hunk ↗ jump to hunk
+void __init vt8500_init(void)
+{
+	struct device_node *np, *fb;
+	void __iomem *gpio_base;
+
+#ifdef CONFIG_FB_VT8500
+	fb = of_find_compatible_node(NULL, NULL, "via,vt8500-fb");
+	if (fb) {
+		np = of_find_compatible_node(NULL, NULL, "via,vt8500-gpio");
+		if (np) {
+			gpio_base = of_iomap(np, 0);
+
+			if (!gpio_base)
+				pr_err("%s:of_iomap(gpio_mux) failed\n", __func__);
+
+			of_node_put(np);
+		} else {
+			gpio_base = ioremap(LEGACY_GPIO_BASE, 0x1000);
+			if (!gpio_base)
+				pr_err("%s:ioremap(legacy_gpio_mux) failed\n", __func__);
+		}
+		if (gpio_base) {
+			writel(readl(gpio_base + VT8500_GPIO_MUX_REG) | 1,
+				gpio_base + VT8500_GPIO_MUX_REG);
+			iounmap(gpio_base);
+		} else
+			pr_err("%s: Could not remap GPIO mux\n", __func__);
+
+		of_node_put(fb);
+	}
+#endif
That looks quite suspicious. What's it doing? Is this something that
should be part of a pinctrl driver, or the GPIO driver?
Thread (17 messages) 17 messages, 4 authors, last reply 2012-08-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help