ARM: Kirkwood: Make use of mvebu pincltl and gpio drivers
authorAndrew Lunn <andrew@lunn.ch>
Sat, 17 Nov 2012 16:00:44 +0000 (17:00 +0100)
committerJason Cooper <jason@lakedaemon.net>
Sat, 24 Nov 2012 02:57:35 +0000 (02:57 +0000)
Select the generic mvebu kirkwood pincltr driver and generic mvebu
gpio driver. This requires minor changes to the DT, and the calls to
configure plat-orion gpio driver are removed.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Michael Walle <michael@walle.cc>
Tested-by: Simon Baatz <gmbnomis@gmail.com>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Tested-by: Joshua Coombs <josh.coombs@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/Kconfig
arch/arm/boot/dts/kirkwood.dtsi
arch/arm/plat-orion/irq.c

index ca2b4182061ae8c7240474bd39de87846a7e29dd..3cf5742a23caf94102a5facf31f3c20ed6ca1c57 100644 (file)
@@ -549,6 +549,8 @@ config ARCH_KIRKWOOD
        select CPU_FEROCEON
        select GENERIC_CLOCKEVENTS
        select PCI
+       select PINCTRL
+       select PINCTRL_KIRKWOOD
        select PLAT_ORION_LEGACY
        help
          Support for the following Marvell Kirkwood series SoCs:
index 4fc7a8e4916808faaf4361f75c93292003c8bab3..a990c30f0a2602936f76c3cd79cca99e2966ad40 100644 (file)
@@ -4,6 +4,10 @@
        compatible = "marvell,kirkwood";
        interrupt-parent = <&intc>;
 
+       aliases {
+              gpio0 = &gpio0;
+              gpio1 = &gpio1;
+       };
        intc: interrupt-controller {
                compatible = "marvell,orion-intc", "marvell,intc";
                interrupt-controller;
@@ -24,7 +28,8 @@
                        #gpio-cells = <2>;
                        gpio-controller;
                        reg = <0x10100 0x40>;
-                       ngpio = <32>;
+                       ngpios = <32>;
+                       interrupt-controller;
                        interrupts = <35>, <36>, <37>, <38>;
                };
 
@@ -33,7 +38,8 @@
                        #gpio-cells = <2>;
                        gpio-controller;
                        reg = <0x10140 0x40>;
-                       ngpio = <18>;
+                       ngpios = <18>;
+                       interrupt-controller;
                        interrupts = <39>, <40>, <41>;
                };
 
index 1867944415cab925e2817174b8d8bd0d216c5863..8db0b981ca64f2b368e3fed396637c0957869791 100644 (file)
@@ -41,7 +41,7 @@ void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr)
 static int __init orion_add_irq_domain(struct device_node *np,
                                       struct device_node *interrupt_parent)
 {
-       int i = 0, irq_gpio;
+       int i = 0;
        void __iomem *base;
 
        do {
@@ -54,10 +54,6 @@ static int __init orion_add_irq_domain(struct device_node *np,
 
        irq_domain_add_legacy(np, i * 32, 0, 0,
                              &irq_domain_simple_ops, NULL);
-
-       irq_gpio = i * 32;
-       orion_gpio_of_init(irq_gpio);
-
        return 0;
 }