linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 5/6] ARM: orion: move custom gpio functions to orion-gpio.h
Date: Thu,  6 Sep 2012 14:42:42 -0500	[thread overview]
Message-ID: <1346960563-18689-6-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1346960563-18689-1-git-send-email-robherring2@gmail.com>

From: Rob Herring <rob.herring@calxeda.com>

Move custom orion platforms gpio code to orion-gpio to remove the
dependency on mach/gpio.h.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/mach-dove/include/mach/gpio.h        |   10 +------
 arch/arm/mach-dove/irq.c                      |    1 +
 arch/arm/mach-dove/mpp.c                      |    1 +
 arch/arm/mach-kirkwood/include/mach/gpio.h    |   10 +------
 arch/arm/mach-kirkwood/irq.c                  |    1 +
 arch/arm/mach-kirkwood/rd88f6192-nas-setup.c  |    1 +
 arch/arm/mach-mv78xx0/irq.c                   |    1 +
 arch/arm/mach-orion5x/d2net-setup.c           |    1 +
 arch/arm/mach-orion5x/dns323-setup.c          |    1 +
 arch/arm/mach-orion5x/include/mach/gpio.h     |   10 +------
 arch/arm/mach-orion5x/irq.c                   |    1 +
 arch/arm/mach-orion5x/net2big-setup.c         |    1 +
 arch/arm/plat-orion/include/plat/gpio.h       |   37 -------------------------
 arch/arm/plat-orion/include/plat/orion-gpio.h |   37 +++++++++++++++++++++++++
 arch/arm/plat-orion/mpp.c                     |    1 +
 15 files changed, 50 insertions(+), 64 deletions(-)
 delete mode 100644 arch/arm/plat-orion/include/plat/gpio.h
 create mode 100644 arch/arm/plat-orion/include/plat/orion-gpio.h

diff --git a/arch/arm/mach-dove/include/mach/gpio.h b/arch/arm/mach-dove/include/mach/gpio.h
index e7e5101..40a8c17 100644
--- a/arch/arm/mach-dove/include/mach/gpio.h
+++ b/arch/arm/mach-dove/include/mach/gpio.h
@@ -1,9 +1 @@
-/*
- * arch/arm/mach-dove/include/mach/gpio.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <plat/gpio.h>
+/* empty */
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c
index 9bc97a5..186357f 100644
--- a/arch/arm/mach-dove/irq.c
+++ b/arch/arm/mach-dove/irq.c
@@ -18,6 +18,7 @@
 #include <asm/mach/irq.h>
 #include <mach/pm.h>
 #include <mach/bridge-regs.h>
+#include <plat/orion-gpio.h>
 #include "common.h"
 
 static void pmu_irq_mask(struct irq_data *d)
diff --git a/arch/arm/mach-dove/mpp.c b/arch/arm/mach-dove/mpp.c
index 7f70afc..60bd729 100644
--- a/arch/arm/mach-dove/mpp.c
+++ b/arch/arm/mach-dove/mpp.c
@@ -13,6 +13,7 @@
 #include <linux/io.h>
 #include <plat/mpp.h>
 #include <mach/dove.h>
+#include <plat/orion-gpio.h>
 #include "mpp.h"
 
 struct dove_mpp_grp {
diff --git a/arch/arm/mach-kirkwood/include/mach/gpio.h b/arch/arm/mach-kirkwood/include/mach/gpio.h
index 84f340b..40a8c17 100644
--- a/arch/arm/mach-kirkwood/include/mach/gpio.h
+++ b/arch/arm/mach-kirkwood/include/mach/gpio.h
@@ -1,9 +1 @@
-/*
- * arch/asm-arm/mach-kirkwood/include/mach/gpio.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <plat/gpio.h>
+/* empty */
diff --git a/arch/arm/mach-kirkwood/irq.c b/arch/arm/mach-kirkwood/irq.c
index 720063f..20149a7 100644
--- a/arch/arm/mach-kirkwood/irq.c
+++ b/arch/arm/mach-kirkwood/irq.c
@@ -11,6 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/irq.h>
 #include <mach/bridge-regs.h>
+#include <plat/orion-gpio.h>
 #include <plat/irq.h>
 
 static int __initdata gpio0_irqs[4] = {
diff --git a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
index f742a66..19072c8 100644
--- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
@@ -19,6 +19,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <mach/kirkwood.h>
+#include <plat/orion-gpio.h>
 #include "common.h"
 
 #define RD88F6192_GPIO_USB_VBUS		10
diff --git a/arch/arm/mach-mv78xx0/irq.c b/arch/arm/mach-mv78xx0/irq.c
index eff9a75..4d720f2 100644
--- a/arch/arm/mach-mv78xx0/irq.c
+++ b/arch/arm/mach-mv78xx0/irq.c
@@ -11,6 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/irq.h>
 #include <mach/bridge-regs.h>
+#include <plat/orion-gpio.h>
 #include <plat/irq.h>
 #include "common.h"
 
diff --git a/arch/arm/mach-orion5x/d2net-setup.c b/arch/arm/mach-orion5x/d2net-setup.c
index d75dcfa..e3629c0 100644
--- a/arch/arm/mach-orion5x/d2net-setup.c
+++ b/arch/arm/mach-orion5x/d2net-setup.c
@@ -27,6 +27,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/pci.h>
 #include <mach/orion5x.h>
+#include <plat/orion-gpio.h>
 #include "common.h"
 #include "mpp.h"
 
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index d470864..0e19db6 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -34,6 +34,7 @@
 #include <asm/mach/pci.h>
 #include <asm/system_info.h>
 #include <mach/orion5x.h>
+#include <plat/orion-gpio.h>
 #include "common.h"
 #include "mpp.h"
 
diff --git a/arch/arm/mach-orion5x/include/mach/gpio.h b/arch/arm/mach-orion5x/include/mach/gpio.h
index a1d0b78..40a8c17 100644
--- a/arch/arm/mach-orion5x/include/mach/gpio.h
+++ b/arch/arm/mach-orion5x/include/mach/gpio.h
@@ -1,9 +1 @@
-/*
- * arch/arm/mach-orion5x/include/mach/gpio.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <plat/gpio.h>
+/* empty */
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c
index 17da709..e152641 100644
--- a/arch/arm/mach-orion5x/irq.c
+++ b/arch/arm/mach-orion5x/irq.c
@@ -13,6 +13,7 @@
 #include <linux/kernel.h>
 #include <linux/irq.h>
 #include <mach/bridge-regs.h>
+#include <plat/orion-gpio.h>
 #include <plat/irq.h>
 
 static int __initdata gpio0_irqs[4] = {
diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c
index 0180c39..3506f16 100644
--- a/arch/arm/mach-orion5x/net2big-setup.c
+++ b/arch/arm/mach-orion5x/net2big-setup.c
@@ -25,6 +25,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <mach/orion5x.h>
+#include <plat/orion-gpio.h>
 #include "common.h"
 #include "mpp.h"
 
diff --git a/arch/arm/plat-orion/include/plat/gpio.h b/arch/arm/plat-orion/include/plat/gpio.h
deleted file mode 100644
index 81c6fc8..0000000
--- a/arch/arm/plat-orion/include/plat/gpio.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * arch/arm/plat-orion/include/plat/gpio.h
- *
- * Marvell Orion SoC GPIO handling.
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __PLAT_GPIO_H
-#define __PLAT_GPIO_H
-
-#include <linux/init.h>
-#include <linux/types.h>
-#include <linux/irqdomain.h>
-/*
- * Orion-specific GPIO API extensions.
- */
-void orion_gpio_set_unused(unsigned pin);
-void orion_gpio_set_blink(unsigned pin, int blink);
-int orion_gpio_led_blink_set(unsigned gpio, int state,
-	unsigned long *delay_on, unsigned long *delay_off);
-
-#define GPIO_INPUT_OK		(1 << 0)
-#define GPIO_OUTPUT_OK		(1 << 1)
-void orion_gpio_set_valid(unsigned pin, int mode);
-
-/* Initialize gpiolib. */
-void __init orion_gpio_init(struct device_node *np,
-			    int gpio_base, int ngpio,
-			    void __iomem *base, int mask_offset,
-			    int secondary_irq_base,
-			    int irq[4]);
-
-void __init orion_gpio_of_init(int irq_gpio_base);
-#endif
diff --git a/arch/arm/plat-orion/include/plat/orion-gpio.h b/arch/arm/plat-orion/include/plat/orion-gpio.h
new file mode 100644
index 0000000..81c6fc8
--- /dev/null
+++ b/arch/arm/plat-orion/include/plat/orion-gpio.h
@@ -0,0 +1,37 @@
+/*
+ * arch/arm/plat-orion/include/plat/gpio.h
+ *
+ * Marvell Orion SoC GPIO handling.
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __PLAT_GPIO_H
+#define __PLAT_GPIO_H
+
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/irqdomain.h>
+/*
+ * Orion-specific GPIO API extensions.
+ */
+void orion_gpio_set_unused(unsigned pin);
+void orion_gpio_set_blink(unsigned pin, int blink);
+int orion_gpio_led_blink_set(unsigned gpio, int state,
+	unsigned long *delay_on, unsigned long *delay_off);
+
+#define GPIO_INPUT_OK		(1 << 0)
+#define GPIO_OUTPUT_OK		(1 << 1)
+void orion_gpio_set_valid(unsigned pin, int mode);
+
+/* Initialize gpiolib. */
+void __init orion_gpio_init(struct device_node *np,
+			    int gpio_base, int ngpio,
+			    void __iomem *base, int mask_offset,
+			    int secondary_irq_base,
+			    int irq[4]);
+
+void __init orion_gpio_of_init(int irq_gpio_base);
+#endif
diff --git a/arch/arm/plat-orion/mpp.c b/arch/arm/plat-orion/mpp.c
index 3b1e17b..c140c2f 100644
--- a/arch/arm/plat-orion/mpp.c
+++ b/arch/arm/plat-orion/mpp.c
@@ -14,6 +14,7 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 #include <mach/hardware.h>
+#include <plat/gpio.h>
 #include <plat/mpp.h>
 
 /* Address of the ith MPP control register */
-- 
1.7.9.5

  parent reply	other threads:[~2012-09-06 19:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06 19:42 [PATCH v2 0/6] Make mach/gpio.h optional Rob Herring
2012-09-06 19:42 ` [PATCH v2 1/6] usb: pxa27x_udc: remove IRQ_USB define Rob Herring
2012-09-07  3:56   ` Eric Miao
2012-09-10 18:07     ` Greg Kroah-Hartman
2012-09-06 19:42 ` [PATCH v2 2/6] net: pxaficp_ir: add irq resources Rob Herring
2012-09-06 20:46   ` David Miller
2012-09-07  3:54   ` Eric Miao
2012-09-06 19:42 ` [PATCH v2 3/6] ARM: pxa: use gpio_to_irq for sharppm_sl Rob Herring
2012-09-06 19:42 ` [PATCH v2 4/6] ARM: shmobile: move custom gpio functions to sh-gpio.h Rob Herring
2012-09-06 19:42 ` Rob Herring [this message]
2012-09-07 15:00   ` [PATCH v2 5/6] ARM: orion: move custom gpio functions to orion-gpio.h Jason Cooper
2012-09-12 20:11   ` Arnd Bergmann
2012-09-12 20:14     ` Rob Herring
2012-09-12 20:22       ` Arnd Bergmann
2012-09-12 20:50         ` Rob Herring
2012-09-06 19:42 ` [PATCH v2 6/6] ARM: make mach/gpio.h headers optional Rob Herring
2012-09-07 15:04   ` Jason Cooper
2012-09-12 20:45   ` Arnd Bergmann
2012-09-12 21:05   ` Linus Walleij
2012-09-07 21:17 ` [PATCH v2 0/6] Make mach/gpio.h optional Linus Walleij
2012-09-13 13:07 ` [PATCH] staging: ste_rmi4: remove gpio.h include Rob Herring
2012-09-13 13:32   ` Rob Herring
2012-09-13 14:18     ` Linus Walleij
2012-09-14  3:27     ` Greg Kroah-Hartman
2012-09-14 12:28       ` Rob Herring
2012-09-14 13:36         ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1346960563-18689-6-git-send-email-robherring2@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).