From patchwork Thu Sep 6 19:42:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 1417531 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id A9E1E3FC85 for ; Thu, 6 Sep 2012 19:46:42 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9hzQ-0001dF-G4; Thu, 06 Sep 2012 19:43:48 +0000 Received: from mail-ob0-f177.google.com ([209.85.214.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T9hyl-0001Wc-6t for linux-arm-kernel@lists.infradead.org; Thu, 06 Sep 2012 19:43:09 +0000 Received: by mail-ob0-f177.google.com with SMTP id ta17so3313948obb.36 for ; Thu, 06 Sep 2012 12:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=Q9ZN9gWhOS6+Knwppbfxg/aFlKY7Q+BVsADAwrG7wfk=; b=e+gxcprh0dNaH5yhIR5Uw3AL7g+GUH9YOmoIfZr6xqjyl/fRuDf4VFxU8+wUzcQNGC XQDUdrfEqKfzrASBojJP19jO0EOPisJhGJEdOc3p8/hUSTgrW3seQp2s598zm5SyXWY+ aRB3If6Uv1hASarTG/NECMKjw0nRIxWwRssI7z1d7JPyr6hcW+miL6Z3uJFv2l52rgMP OAVxmvdLaETkoJlFVlAusK81FaM5E2VBnJEX8LpmnMsSOK/NNqAeyx48Arpoaoyzf7Tz eaCiuDHkT2ZXszUae1rgmd0IB3L1WEQI3rhu6gTsJqvX7bL4oaQEIw7E4f0JsUxWMXNx lOKQ== Received: by 10.60.169.138 with SMTP id ae10mr3602511oec.7.1346960586988; Thu, 06 Sep 2012 12:43:06 -0700 (PDT) Received: from rob-laptop.calxeda.com ([173.226.190.126]) by mx.google.com with ESMTPS id th3sm2754774obb.6.2012.09.06.12.43.03 (version=SSLv3 cipher=OTHER); Thu, 06 Sep 2012 12:43:05 -0700 (PDT) From: 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 Message-Id: <1346960563-18689-6-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1346960563-18689-1-git-send-email-robherring2@gmail.com> References: <1346960563-18689-1-git-send-email-robherring2@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robherring2[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (robherring2[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Andrew Lunn , Russell King , Jason Cooper , Arnd Bergmann , Linus Walleij , Rob Herring , Olof Johansson X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Rob Herring Move custom orion platforms gpio code to orion-gpio to remove the dependency on mach/gpio.h. Signed-off-by: Rob Herring Cc: Jason Cooper Cc: Andrew Lunn Acked-by: Jason Cooper --- 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 +/* 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 #include #include +#include #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 #include #include +#include #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 +/* 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 #include #include +#include #include 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 #include #include +#include #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 #include #include +#include #include #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 #include #include +#include #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 #include #include +#include #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 +/* 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 #include #include +#include #include 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 #include #include +#include #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 -#include -#include -/* - * 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 +#include +#include +/* + * 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 #include #include +#include #include /* Address of the ith MPP control register */