From ce91574c202b8581ad15bfb1427af824f462c3d2 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 29 Aug 2012 10:16:55 -0500 Subject: ARM: orion: move custom gpio functions to orion-gpio.h Move custom orion platforms gpio code to orion-gpio to remove the dependency on mach/gpio.h. Signed-off-by: Rob Herring Acked-by: Jason Cooper Cc: Andrew Lunn --- 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/gpio.c | 2 +- arch/arm/plat-orion/include/plat/gpio.h | 37 --------------------------- arch/arm/plat-orion/include/plat/orion-gpio.h | 37 +++++++++++++++++++++++++++ arch/arm/plat-orion/irq.c | 2 +- arch/arm/plat-orion/mpp.c | 1 + 17 files changed, 52 insertions(+), 66 deletions(-) delete mode 100644 arch/arm/plat-orion/include/plat/gpio.h create mode 100644 arch/arm/plat-orion/include/plat/orion-gpio.h (limited to 'arch') diff --git a/arch/arm/mach-dove/include/mach/gpio.h b/arch/arm/mach-dove/include/mach/gpio.h index e7e5101e35a5..40a8c178f10d 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 9bc97a5baaa8..186357f3b4db 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 7f70afc26f91..60bd729a1ba5 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 84f340b546c0..40a8c178f10d 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 720063ffa19d..20149a7fd280 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 f742a66a7045..19072c84008f 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 eff9a750bbe2..4d720f2aedba 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 d75dcfa0f01c..e3629c063df2 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 d470864b4e42..0e19db69f5c4 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 a1d0b78decb1..40a8c178f10d 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 17da7091d310..e152641cdb0e 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 0180c393c711..3506f16c0bf2 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/gpio.c b/arch/arm/plat-orion/gpio.c index dfda74fae6f2..c29ee7ea200b 100644 --- a/arch/arm/plat-orion/gpio.c +++ b/arch/arm/plat-orion/gpio.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include /* * GPIO unit register offsets. 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 81c6fc8a7b28..000000000000 --- 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 000000000000..614dcac9dc52 --- /dev/null +++ b/arch/arm/plat-orion/include/plat/orion-gpio.h @@ -0,0 +1,37 @@ +/* + * arch/arm/plat-orion/include/plat/orion-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/irq.c b/arch/arm/plat-orion/irq.c index d751964def4c..1867944415ca 100644 --- a/arch/arm/plat-orion/irq.c +++ b/arch/arm/plat-orion/irq.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr) { diff --git a/arch/arm/plat-orion/mpp.c b/arch/arm/plat-orion/mpp.c index 3b1e17bd3d17..7740bb31d662 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 */ -- cgit v1.2.3