Commit cf2e933c authored by Linus Walleij's avatar Linus Walleij Committed by Nicolas Ferre

ARM: at91: localize GPIO header

This moves the <mach/gpio.h> header in the AT91 platform down
into the machine directory and removes the reliance on
MACH_NEED_GPIO_H from the AT91.

This does not move the platform to GENERIC_GPIO but localize
the remaining work to be done for this to the mach-at91
folder.
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
[nicolas.ferre@atmel.com: adapt to newer kernel, add rsi-ews board]
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
parent 15fb63a0
...@@ -376,7 +376,6 @@ config ARCH_AT91 ...@@ -376,7 +376,6 @@ config ARCH_AT91
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select CLKDEV_LOOKUP select CLKDEV_LOOKUP
select IRQ_DOMAIN select IRQ_DOMAIN
select NEED_MACH_GPIO_H
select NEED_MACH_IO_H if PCCARD select NEED_MACH_IO_H if PCCARD
select PINCTRL select PINCTRL
select PINCTRL_AT91 if USE_OF select PINCTRL_AT91 if USE_OF
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
/* -------------------------------------------------------------------- /* --------------------------------------------------------------------
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
/* -------------------------------------------------------------------- /* --------------------------------------------------------------------
* USB Host * USB Host
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
/* -------------------------------------------------------------------- /* --------------------------------------------------------------------
* USB Host * USB Host
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
/* -------------------------------------------------------------------- /* --------------------------------------------------------------------
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "clock.h" #include "clock.h"
#include "gpio.h"
/* -------------------------------------------------------------------- /* --------------------------------------------------------------------
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
/* -------------------------------------------------------------------- /* --------------------------------------------------------------------
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init onearm_init_early(void) static void __init onearm_init_early(void)
{ {
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init afeb9260_init_early(void) static void __init afeb9260_init_early(void)
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "board.h" #include "board.h"
#include "sam9_smc.h" #include "sam9_smc.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init cam60_init_early(void) static void __init cam60_init_early(void)
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init carmeva_init_early(void) static void __init carmeva_init_early(void)
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include "board.h" #include "board.h"
#include "sam9_smc.h" #include "sam9_smc.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init cpu9krea_init_early(void) static void __init cpu9krea_init_early(void)
{ {
......
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static struct gpio_led cpuat91_leds[] = { static struct gpio_led cpuat91_leds[] = {
{ {
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init csb337_init_early(void) static void __init csb337_init_early(void)
{ {
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init csb637_init_early(void) static void __init csb637_init_early(void)
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init eb9200_init_early(void) static void __init eb9200_init_early(void)
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init ecb_at91init_early(void) static void __init ecb_at91init_early(void)
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init eco920_init_early(void) static void __init eco920_init_early(void)
{ {
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init flexibity_init_early(void) static void __init flexibity_init_early(void)
{ {
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include "board.h" #include "board.h"
#include "sam9_smc.h" #include "sam9_smc.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
/* /*
* The FOX Board G20 hardware comes as the "Netus G20" board with * The FOX Board G20 hardware comes as the "Netus G20" board with
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "generic.h" #include "generic.h"
#include "gsia18s.h" #include "gsia18s.h"
#include "stamp9g20.h" #include "stamp9g20.h"
#include "gpio.h"
static void __init gsia18s_init_early(void) static void __init gsia18s_init_early(void)
{ {
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init kafa_init_early(void) static void __init kafa_init_early(void)
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init kb9202_init_early(void) static void __init kb9202_init_early(void)
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "sam9_smc.h" #include "sam9_smc.h"
#include "generic.h" #include "generic.h"
#include "stamp9g20.h" #include "stamp9g20.h"
#include "gpio.h"
static void __init pcontrol_g20_init_early(void) static void __init pcontrol_g20_init_early(void)
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init picotux200_init_early(void) static void __init picotux200_init_early(void)
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void) static void __init ek_init_early(void)
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init rsi_ews_init_early(void) static void __init rsi_ews_init_early(void)
{ {
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "board.h" #include "board.h"
#include "sam9_smc.h" #include "sam9_smc.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void) static void __init ek_init_early(void)
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include "board.h" #include "board.h"
#include "sam9_smc.h" #include "sam9_smc.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void) static void __init ek_init_early(void)
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include "board.h" #include "board.h"
#include "sam9_smc.h" #include "sam9_smc.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void) static void __init ek_init_early(void)
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#include "board.h" #include "board.h"
#include "sam9_smc.h" #include "sam9_smc.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void) static void __init ek_init_early(void)
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include "board.h" #include "board.h"
#include "sam9_smc.h" #include "sam9_smc.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
/* /*
* board revision encoding * board revision encoding
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include "board.h" #include "board.h"
#include "sam9_smc.h" #include "sam9_smc.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void) static void __init ek_init_early(void)
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "board.h" #include "board.h"
#include "sam9_smc.h" #include "sam9_smc.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void) static void __init ek_init_early(void)
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "board.h" #include "board.h"
#include "sam9_smc.h" #include "sam9_smc.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
#define SNAPPER9260_IO_EXP_GPIO(x) (NR_BUILTIN_GPIO + (x)) #define SNAPPER9260_IO_EXP_GPIO(x) (NR_BUILTIN_GPIO + (x))
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "board.h" #include "board.h"
#include "sam9_smc.h" #include "sam9_smc.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
void __init stamp9g20_init_early(void) void __init stamp9g20_init_early(void)
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "board.h" #include "board.h"
#include "generic.h" #include "generic.h"
#include "gpio.h"
static void __init yl9200_init_early(void) static void __init yl9200_init_early(void)
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <mach/at91_pio.h> #include <mach/at91_pio.h>
#include "generic.h" #include "generic.h"
#include "gpio.h"
#define MAX_NB_GPIO_PER_BANK 32 #define MAX_NB_GPIO_PER_BANK 32
......
...@@ -209,14 +209,6 @@ extern int at91_get_gpio_value(unsigned pin); ...@@ -209,14 +209,6 @@ extern int at91_get_gpio_value(unsigned pin);
extern void at91_gpio_suspend(void); extern void at91_gpio_suspend(void);
extern void at91_gpio_resume(void); extern void at91_gpio_resume(void);
#ifdef CONFIG_PINCTRL_AT91
extern void at91_pinctrl_gpio_suspend(void);
extern void at91_pinctrl_gpio_resume(void);
#else
static inline void at91_pinctrl_gpio_suspend(void) {}
static inline void at91_pinctrl_gpio_resume(void) {}
#endif
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif #endif
...@@ -104,5 +104,20 @@ ...@@ -104,5 +104,20 @@
/* Clocks */ /* Clocks */
#define AT91_SLOW_CLOCK 32768 /* slow clock */ #define AT91_SLOW_CLOCK 32768 /* slow clock */
/*
* FIXME: this is needed to communicate between the pinctrl driver and
* the PM implementation in the machine. Possibly part of the PM
* implementation should be moved down into the pinctrl driver and get
* called as part of the generic suspend/resume path.
*/
#ifndef __ASSEMBLY__
#ifdef CONFIG_PINCTRL_AT91
extern void at91_pinctrl_gpio_suspend(void);
extern void at91_pinctrl_gpio_resume(void);
#else
static inline void at91_pinctrl_gpio_suspend(void) {}
static inline void at91_pinctrl_gpio_resume(void) {}
#endif
#endif
#endif #endif
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include "board.h" #include "board.h"
#include "gpio.h"
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "at91_aic.h" #include "at91_aic.h"
#include "generic.h" #include "generic.h"
#include "pm.h" #include "pm.h"
#include "gpio.h"
/* /*
* Show the reason for the previous system reset. * Show the reason for the previous system reset.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment