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: Linus Walleij <linus.walleij@linaro.org>
[nicolas.ferre@atmel.com: adapt to newer kernel, add rsi-ews board]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
This commit is contained in:
Linus Walleij 2014-03-27 14:18:51 +01:00 committed by Nicolas Ferre
parent 15fb63a08b
commit cf2e933ce6
42 changed files with 56 additions and 13 deletions

View File

@ -376,7 +376,6 @@ config ARCH_AT91
select ARCH_REQUIRE_GPIOLIB
select CLKDEV_LOOKUP
select IRQ_DOMAIN
select NEED_MACH_GPIO_H
select NEED_MACH_IO_H if PCCARD
select PINCTRL
select PINCTRL_AT91 if USE_OF

View File

@ -25,6 +25,7 @@
#include "board.h"
#include "generic.h"
#include "gpio.h"
/* --------------------------------------------------------------------

View File

@ -29,7 +29,7 @@
#include "board.h"
#include "generic.h"
#include "gpio.h"
/* --------------------------------------------------------------------
* USB Host

View File

@ -29,7 +29,7 @@
#include "board.h"
#include "generic.h"
#include "gpio.h"
/* --------------------------------------------------------------------
* USB Host

View File

@ -28,6 +28,7 @@
#include "board.h"
#include "generic.h"
#include "gpio.h"
/* --------------------------------------------------------------------

View File

@ -39,6 +39,7 @@
#include "board.h"
#include "generic.h"
#include "clock.h"
#include "gpio.h"
/* --------------------------------------------------------------------

View File

@ -26,6 +26,7 @@
#include "board.h"
#include "generic.h"
#include "gpio.h"
/* --------------------------------------------------------------------

View File

@ -39,7 +39,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init onearm_init_early(void)
{

View File

@ -46,6 +46,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init afeb9260_init_early(void)

View File

@ -44,6 +44,7 @@
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
#include "gpio.h"
static void __init cam60_init_early(void)

View File

@ -39,6 +39,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init carmeva_init_early(void)

View File

@ -48,6 +48,7 @@
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
#include "gpio.h"
static void __init cpu9krea_init_early(void)
{

View File

@ -43,6 +43,8 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static struct gpio_led cpuat91_leds[] = {
{

View File

@ -42,7 +42,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init csb337_init_early(void)
{

View File

@ -39,6 +39,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init csb637_init_early(void)

View File

@ -38,6 +38,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init eb9200_init_early(void)

View File

@ -42,6 +42,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init ecb_at91init_early(void)

View File

@ -31,6 +31,8 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init eco920_init_early(void)
{

View File

@ -37,6 +37,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init flexibity_init_early(void)
{

View File

@ -47,6 +47,7 @@
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
#include "gpio.h"
/*
* The FOX Board G20 hardware comes as the "Netus G20" board with

View File

@ -39,6 +39,7 @@
#include "generic.h"
#include "gsia18s.h"
#include "stamp9g20.h"
#include "gpio.h"
static void __init gsia18s_init_early(void)
{

View File

@ -39,6 +39,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init kafa_init_early(void)

View File

@ -42,6 +42,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init kb9202_init_early(void)

View File

@ -37,6 +37,7 @@
#include "sam9_smc.h"
#include "generic.h"
#include "stamp9g20.h"
#include "gpio.h"
static void __init pcontrol_g20_init_early(void)

View File

@ -43,6 +43,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init picotux200_init_early(void)

View File

@ -45,6 +45,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void)

View File

@ -31,6 +31,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init rsi_ews_init_early(void)
{

View File

@ -43,6 +43,7 @@
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void)

View File

@ -49,6 +49,7 @@
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void)

View File

@ -53,6 +53,7 @@
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void)

View File

@ -52,6 +52,7 @@
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void)

View File

@ -50,6 +50,7 @@
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
#include "gpio.h"
/*
* board revision encoding

View File

@ -50,6 +50,7 @@
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void)

View File

@ -38,6 +38,7 @@
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
#include "gpio.h"
static void __init ek_init_early(void)

View File

@ -38,6 +38,7 @@
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
#include "gpio.h"
#define SNAPPER9260_IO_EXP_GPIO(x) (NR_BUILTIN_GPIO + (x))

View File

@ -32,6 +32,7 @@
#include "board.h"
#include "sam9_smc.h"
#include "generic.h"
#include "gpio.h"
void __init stamp9g20_init_early(void)

View File

@ -50,6 +50,7 @@
#include "at91_aic.h"
#include "board.h"
#include "generic.h"
#include "gpio.h"
static void __init yl9200_init_early(void)

View File

@ -29,6 +29,7 @@
#include <mach/at91_pio.h>
#include "generic.h"
#include "gpio.h"
#define MAX_NB_GPIO_PER_BANK 32

View File

@ -209,14 +209,6 @@ extern int at91_get_gpio_value(unsigned pin);
extern void at91_gpio_suspend(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

View File

@ -104,5 +104,20 @@
/* Clocks */
#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

View File

@ -16,6 +16,7 @@
#include <linux/platform_device.h>
#include "board.h"
#include "gpio.h"
/* ------------------------------------------------------------------------- */

View File

@ -32,6 +32,7 @@
#include "at91_aic.h"
#include "generic.h"
#include "pm.h"
#include "gpio.h"
/*
* Show the reason for the previous system reset.