ARM: at91: localize GPIO header
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 27 Mar 2014 13:18:51 +0000 (14:18 +0100)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Wed, 7 May 2014 16:27:21 +0000 (18:27 +0200)
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>
43 files changed:
arch/arm/Kconfig
arch/arm/mach-at91/at91rm9200_devices.c
arch/arm/mach-at91/at91sam9260_devices.c
arch/arm/mach-at91/at91sam9261_devices.c
arch/arm/mach-at91/at91sam9263_devices.c
arch/arm/mach-at91/at91sam9g45_devices.c
arch/arm/mach-at91/at91sam9rl_devices.c
arch/arm/mach-at91/board-1arm.c
arch/arm/mach-at91/board-afeb-9260v1.c
arch/arm/mach-at91/board-cam60.c
arch/arm/mach-at91/board-carmeva.c
arch/arm/mach-at91/board-cpu9krea.c
arch/arm/mach-at91/board-cpuat91.c
arch/arm/mach-at91/board-csb337.c
arch/arm/mach-at91/board-csb637.c
arch/arm/mach-at91/board-eb9200.c
arch/arm/mach-at91/board-ecbat91.c
arch/arm/mach-at91/board-eco920.c
arch/arm/mach-at91/board-flexibity.c
arch/arm/mach-at91/board-foxg20.c
arch/arm/mach-at91/board-gsia18s.c
arch/arm/mach-at91/board-kafa.c
arch/arm/mach-at91/board-kb9202.c
arch/arm/mach-at91/board-pcontrol-g20.c
arch/arm/mach-at91/board-picotux200.c
arch/arm/mach-at91/board-rm9200ek.c
arch/arm/mach-at91/board-rsi-ews.c
arch/arm/mach-at91/board-sam9-l9260.c
arch/arm/mach-at91/board-sam9260ek.c
arch/arm/mach-at91/board-sam9261ek.c
arch/arm/mach-at91/board-sam9263ek.c
arch/arm/mach-at91/board-sam9g20ek.c
arch/arm/mach-at91/board-sam9m10g45ek.c
arch/arm/mach-at91/board-sam9rlek.c
arch/arm/mach-at91/board-snapper9260.c
arch/arm/mach-at91/board-stamp9g20.c
arch/arm/mach-at91/board-yl-9200.c
arch/arm/mach-at91/gpio.c
arch/arm/mach-at91/gpio.h [new file with mode: 0644]
arch/arm/mach-at91/include/mach/gpio.h [deleted file]
arch/arm/mach-at91/include/mach/hardware.h
arch/arm/mach-at91/leds.c
arch/arm/mach-at91/pm.c

index db3c5414223e7298346c6338665263d5f51c0e3c..1c1fbbf6e4ae04c823200355b6c1a1ec04ed4079 100644 (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
index f3f19f21352aa94275755f882226027d58a39287..4860918b411eaa1a348bc5a2570b02238cdbe08b 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 /* --------------------------------------------------------------------
index a0282928e9c10bdbc67b385423b225f8e5315756..df5a7d83d37dd089adf06ecd3bc84cb5ba0944e4 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "board.h"
 #include "generic.h"
-
+#include "gpio.h"
 
 /* --------------------------------------------------------------------
  *  USB Host
index 80e35895d28fb74f06d852d5712cb4c283b56a47..43b21f456f6e65624971001820574e83c055afa2 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "board.h"
 #include "generic.h"
-
+#include "gpio.h"
 
 /* --------------------------------------------------------------------
  *  USB Host
index 43d53d6156dd7fd60384da67afb3784cf08c88f4..953616e5dbcb25a33f91172fd60e197c293922e2 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 /* --------------------------------------------------------------------
index dab362c06487a856c9bcac67dd9248903c133fcd..7f02a5366a31f208e3d1f854c90c3b83db9315c0 100644 (file)
@@ -39,6 +39,7 @@
 #include "board.h"
 #include "generic.h"
 #include "clock.h"
+#include "gpio.h"
 
 
 /* --------------------------------------------------------------------
index 428fc412aaf1e223da13a0d675aea08681391210..ba7ebd9dd4bba26ebc7958e1d529103250f785a7 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 /* --------------------------------------------------------------------
index 35ab632bbf68a169f5e2b1671d7ba79506ccffae..3f6dbcc340228dedfecbfc7718c8bfe564a11973 100644 (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)
 {
index f95e31cda4b33ac1de9101991ea8556167697619..597c649170aa6f0940ac9e4497b29260f829f52d 100644 (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)
index 112e867c4abea764f19cb0470ba253f6e00585d2..a30502c8d3790b89ac80d04b3d12d7290f9e14b7 100644 (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)
index 92983050a9bd2bc78e7ec12f5f69045d18777d7a..47313d3ee037e03d341a5253d21784706345dc80 100644 (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)
index 008527efdbcf6af4d05b56311e3a9678f486c819..2037f78c84e7c7c4e0eef21f4f050a2a07d3ae0d 100644 (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)
 {
index 42f1353a4bafe5566a9c705640b6e210d18e43ac..c094350c93142d2d72ef63771a4bec9474ae3f64 100644 (file)
@@ -43,6 +43,8 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
+
 
 static struct gpio_led cpuat91_leds[] = {
        {
index e5fde215225b2d245dbe419cab59cf8cfdd8210b..0e35a45cf8d44ee1b4705e7cf9b915e78a6ba6f2 100644 (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)
 {
index fdf11061c577585d15297ff12595ba65888e9e10..18d027f529a882982ed691b5b94aac2a21020aee 100644 (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)
index f9be8161bbfafab9ace4dcfc5e74978c06f8a2c8..aa457a8b22f5c197f15090468cb123092cc41e6e 100644 (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)
index b2fcd71262ba2c8c7e4ed72e8913b66e35b09a16..ede1373ccabaeb05dda7e985be53818fdf0f20aa 100644 (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)
index 77de410efc90a94a5f2ba20eb68f28d9b88699ce..4e75321a8f2a4072d1da9da86590dd7718a40780 100644 (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)
 {
index 737c08563628ef40ce68020b8f2f9d56ba8e918a..68f1ab6bd08f499dc7e9a5366071024d14685150 100644 (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)
 {
index c20a870ea9c9295e01eda9842650a3aa593533fd..8b22c60bb2384546b8019268a3179ad8ae57944e 100644 (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
index 416bae8435eeaaeb526eb79bf363cfc5fccb764b..b729dd1271bfbb2210e0e564a11cbbfbfd73e6fe 100644 (file)
@@ -39,6 +39,7 @@
 #include "generic.h"
 #include "gsia18s.h"
 #include "stamp9g20.h"
+#include "gpio.h"
 
 static void __init gsia18s_init_early(void)
 {
index 88e2f5d2d16dfca5e301c6ef826019a3786e8c6c..93b1df42f639c3032b43b322fda870edcdc0c022 100644 (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)
index 0c519d9ebffc578c7c740ce7b8d440699648a5a0..d58d36225e080048e4c527b20adf6cb91a008db8 100644 (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)
index 5f25fa54eb93e9887bea2bced02521941c53a63c..b48d95ec5152954d26e9485c0a5e1f97977a1d5f 100644 (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)
index ab2b2ec36c14a965bbb67aa31717c9adbe92882f..2c0f2d554d8466fdbb42a982da680ac15ab805fb 100644 (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)
index 8b17dadc1aba23766c954614fadf894c1dc8ec9d..953cea416754f9d593dfb4c233d79983319a55ad 100644 (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)
index f6d7f1958c7e5822661ac6517f48aa4de21a7247..f28e8b74df4b2fb2512e1d97425ac4a85e31d2a0 100644 (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)
 {
index 43ee4dc43b50f8851a423721315a3a7f22b8091d..d24dda67e2d343c49259b654c3d2d8d5266759aa 100644 (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)
index f4f8735315dafd8247f686e756423d8b9608a013..65dea12d685ef98ef32e04aade12bf1f2be0d9b5 100644 (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)
index 473546b9408bf087a6b1a38950a9cf2157b3497f..4637432de08f32486e0345b71bc15af121e69d95 100644 (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)
index 2f931915c80c8d2f9a6c9059cf2e6eb07d2093a7..cd2726ee5addc96c52fdf6f443aba0c6b425e080 100644 (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)
index f9cd1f2c71469f6ee3809981c643aaebdd439d7b..e1be6e25b380aab2e002f3b80352be164b637877 100644 (file)
@@ -50,6 +50,7 @@
 #include "board.h"
 #include "sam9_smc.h"
 #include "generic.h"
+#include "gpio.h"
 
 /*
  * board revision encoding
index ef39078c8ce214973352a22055421d7404cb4952..5cd95ede623e6eb51d780cac946147ca020b8d37 100644 (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)
index 604eecf6cd70d03b57c34e6a2736f9feceb5be98..6b81e467164661b9d58ffed991fc80dedd514d7a 100644 (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)
index f1d49e929ccbb039594b7f3b27cb332232fd403a..1b870e6def0cf54b5ea692e5e244a7d69a187b61 100644 (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))
 
index e4a5ac17cdbcb79c020635431ba1ebdf7057c062..3b575036ff961ce73d3e657b1f289a4962993556 100644 (file)
@@ -32,6 +32,7 @@
 #include "board.h"
 #include "sam9_smc.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 void __init stamp9g20_init_early(void)
index be083771df2e813ba055aa05237bb56aa99d4d86..46fdb0c68a68063f51fd3bff7d8039bce9e90758 100644 (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)
index a5afcf76550e3d592f1e7eaf8024327cb6716de3..12ed05bbdc5c7a6ba57cd466c0879b3cde49149f 100644 (file)
@@ -29,6 +29,7 @@
 #include <mach/at91_pio.h>
 
 #include "generic.h"
+#include "gpio.h"
 
 #define MAX_NB_GPIO_PER_BANK   32
 
diff --git a/arch/arm/mach-at91/gpio.h b/arch/arm/mach-at91/gpio.h
new file mode 100644 (file)
index 0000000..eed465a
--- /dev/null
@@ -0,0 +1,214 @@
+/*
+ * arch/arm/mach-at91/include/mach/gpio.h
+ *
+ *  Copyright (C) 2005 HP Labs
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+
+#ifndef __ASM_ARCH_AT91RM9200_GPIO_H
+#define __ASM_ARCH_AT91RM9200_GPIO_H
+
+#include <linux/kernel.h>
+#include <asm/irq.h>
+
+#define MAX_GPIO_BANKS         5
+#define NR_BUILTIN_GPIO                (MAX_GPIO_BANKS * 32)
+
+/* these pin numbers double as IRQ numbers, like AT91xxx_ID_* values */
+
+#define        AT91_PIN_PA0    (0x00 + 0)
+#define        AT91_PIN_PA1    (0x00 + 1)
+#define        AT91_PIN_PA2    (0x00 + 2)
+#define        AT91_PIN_PA3    (0x00 + 3)
+#define        AT91_PIN_PA4    (0x00 + 4)
+#define        AT91_PIN_PA5    (0x00 + 5)
+#define        AT91_PIN_PA6    (0x00 + 6)
+#define        AT91_PIN_PA7    (0x00 + 7)
+#define        AT91_PIN_PA8    (0x00 + 8)
+#define        AT91_PIN_PA9    (0x00 + 9)
+#define        AT91_PIN_PA10   (0x00 + 10)
+#define        AT91_PIN_PA11   (0x00 + 11)
+#define        AT91_PIN_PA12   (0x00 + 12)
+#define        AT91_PIN_PA13   (0x00 + 13)
+#define        AT91_PIN_PA14   (0x00 + 14)
+#define        AT91_PIN_PA15   (0x00 + 15)
+#define        AT91_PIN_PA16   (0x00 + 16)
+#define        AT91_PIN_PA17   (0x00 + 17)
+#define        AT91_PIN_PA18   (0x00 + 18)
+#define        AT91_PIN_PA19   (0x00 + 19)
+#define        AT91_PIN_PA20   (0x00 + 20)
+#define        AT91_PIN_PA21   (0x00 + 21)
+#define        AT91_PIN_PA22   (0x00 + 22)
+#define        AT91_PIN_PA23   (0x00 + 23)
+#define        AT91_PIN_PA24   (0x00 + 24)
+#define        AT91_PIN_PA25   (0x00 + 25)
+#define        AT91_PIN_PA26   (0x00 + 26)
+#define        AT91_PIN_PA27   (0x00 + 27)
+#define        AT91_PIN_PA28   (0x00 + 28)
+#define        AT91_PIN_PA29   (0x00 + 29)
+#define        AT91_PIN_PA30   (0x00 + 30)
+#define        AT91_PIN_PA31   (0x00 + 31)
+
+#define        AT91_PIN_PB0    (0x20 + 0)
+#define        AT91_PIN_PB1    (0x20 + 1)
+#define        AT91_PIN_PB2    (0x20 + 2)
+#define        AT91_PIN_PB3    (0x20 + 3)
+#define        AT91_PIN_PB4    (0x20 + 4)
+#define        AT91_PIN_PB5    (0x20 + 5)
+#define        AT91_PIN_PB6    (0x20 + 6)
+#define        AT91_PIN_PB7    (0x20 + 7)
+#define        AT91_PIN_PB8    (0x20 + 8)
+#define        AT91_PIN_PB9    (0x20 + 9)
+#define        AT91_PIN_PB10   (0x20 + 10)
+#define        AT91_PIN_PB11   (0x20 + 11)
+#define        AT91_PIN_PB12   (0x20 + 12)
+#define        AT91_PIN_PB13   (0x20 + 13)
+#define        AT91_PIN_PB14   (0x20 + 14)
+#define        AT91_PIN_PB15   (0x20 + 15)
+#define        AT91_PIN_PB16   (0x20 + 16)
+#define        AT91_PIN_PB17   (0x20 + 17)
+#define        AT91_PIN_PB18   (0x20 + 18)
+#define        AT91_PIN_PB19   (0x20 + 19)
+#define        AT91_PIN_PB20   (0x20 + 20)
+#define        AT91_PIN_PB21   (0x20 + 21)
+#define        AT91_PIN_PB22   (0x20 + 22)
+#define        AT91_PIN_PB23   (0x20 + 23)
+#define        AT91_PIN_PB24   (0x20 + 24)
+#define        AT91_PIN_PB25   (0x20 + 25)
+#define        AT91_PIN_PB26   (0x20 + 26)
+#define        AT91_PIN_PB27   (0x20 + 27)
+#define        AT91_PIN_PB28   (0x20 + 28)
+#define        AT91_PIN_PB29   (0x20 + 29)
+#define        AT91_PIN_PB30   (0x20 + 30)
+#define        AT91_PIN_PB31   (0x20 + 31)
+
+#define        AT91_PIN_PC0    (0x40 + 0)
+#define        AT91_PIN_PC1    (0x40 + 1)
+#define        AT91_PIN_PC2    (0x40 + 2)
+#define        AT91_PIN_PC3    (0x40 + 3)
+#define        AT91_PIN_PC4    (0x40 + 4)
+#define        AT91_PIN_PC5    (0x40 + 5)
+#define        AT91_PIN_PC6    (0x40 + 6)
+#define        AT91_PIN_PC7    (0x40 + 7)
+#define        AT91_PIN_PC8    (0x40 + 8)
+#define        AT91_PIN_PC9    (0x40 + 9)
+#define        AT91_PIN_PC10   (0x40 + 10)
+#define        AT91_PIN_PC11   (0x40 + 11)
+#define        AT91_PIN_PC12   (0x40 + 12)
+#define        AT91_PIN_PC13   (0x40 + 13)
+#define        AT91_PIN_PC14   (0x40 + 14)
+#define        AT91_PIN_PC15   (0x40 + 15)
+#define        AT91_PIN_PC16   (0x40 + 16)
+#define        AT91_PIN_PC17   (0x40 + 17)
+#define        AT91_PIN_PC18   (0x40 + 18)
+#define        AT91_PIN_PC19   (0x40 + 19)
+#define        AT91_PIN_PC20   (0x40 + 20)
+#define        AT91_PIN_PC21   (0x40 + 21)
+#define        AT91_PIN_PC22   (0x40 + 22)
+#define        AT91_PIN_PC23   (0x40 + 23)
+#define        AT91_PIN_PC24   (0x40 + 24)
+#define        AT91_PIN_PC25   (0x40 + 25)
+#define        AT91_PIN_PC26   (0x40 + 26)
+#define        AT91_PIN_PC27   (0x40 + 27)
+#define        AT91_PIN_PC28   (0x40 + 28)
+#define        AT91_PIN_PC29   (0x40 + 29)
+#define        AT91_PIN_PC30   (0x40 + 30)
+#define        AT91_PIN_PC31   (0x40 + 31)
+
+#define        AT91_PIN_PD0    (0x60 + 0)
+#define        AT91_PIN_PD1    (0x60 + 1)
+#define        AT91_PIN_PD2    (0x60 + 2)
+#define        AT91_PIN_PD3    (0x60 + 3)
+#define        AT91_PIN_PD4    (0x60 + 4)
+#define        AT91_PIN_PD5    (0x60 + 5)
+#define        AT91_PIN_PD6    (0x60 + 6)
+#define        AT91_PIN_PD7    (0x60 + 7)
+#define        AT91_PIN_PD8    (0x60 + 8)
+#define        AT91_PIN_PD9    (0x60 + 9)
+#define        AT91_PIN_PD10   (0x60 + 10)
+#define        AT91_PIN_PD11   (0x60 + 11)
+#define        AT91_PIN_PD12   (0x60 + 12)
+#define        AT91_PIN_PD13   (0x60 + 13)
+#define        AT91_PIN_PD14   (0x60 + 14)
+#define        AT91_PIN_PD15   (0x60 + 15)
+#define        AT91_PIN_PD16   (0x60 + 16)
+#define        AT91_PIN_PD17   (0x60 + 17)
+#define        AT91_PIN_PD18   (0x60 + 18)
+#define        AT91_PIN_PD19   (0x60 + 19)
+#define        AT91_PIN_PD20   (0x60 + 20)
+#define        AT91_PIN_PD21   (0x60 + 21)
+#define        AT91_PIN_PD22   (0x60 + 22)
+#define        AT91_PIN_PD23   (0x60 + 23)
+#define        AT91_PIN_PD24   (0x60 + 24)
+#define        AT91_PIN_PD25   (0x60 + 25)
+#define        AT91_PIN_PD26   (0x60 + 26)
+#define        AT91_PIN_PD27   (0x60 + 27)
+#define        AT91_PIN_PD28   (0x60 + 28)
+#define        AT91_PIN_PD29   (0x60 + 29)
+#define        AT91_PIN_PD30   (0x60 + 30)
+#define        AT91_PIN_PD31   (0x60 + 31)
+
+#define        AT91_PIN_PE0    (0x80 + 0)
+#define        AT91_PIN_PE1    (0x80 + 1)
+#define        AT91_PIN_PE2    (0x80 + 2)
+#define        AT91_PIN_PE3    (0x80 + 3)
+#define        AT91_PIN_PE4    (0x80 + 4)
+#define        AT91_PIN_PE5    (0x80 + 5)
+#define        AT91_PIN_PE6    (0x80 + 6)
+#define        AT91_PIN_PE7    (0x80 + 7)
+#define        AT91_PIN_PE8    (0x80 + 8)
+#define        AT91_PIN_PE9    (0x80 + 9)
+#define        AT91_PIN_PE10   (0x80 + 10)
+#define        AT91_PIN_PE11   (0x80 + 11)
+#define        AT91_PIN_PE12   (0x80 + 12)
+#define        AT91_PIN_PE13   (0x80 + 13)
+#define        AT91_PIN_PE14   (0x80 + 14)
+#define        AT91_PIN_PE15   (0x80 + 15)
+#define        AT91_PIN_PE16   (0x80 + 16)
+#define        AT91_PIN_PE17   (0x80 + 17)
+#define        AT91_PIN_PE18   (0x80 + 18)
+#define        AT91_PIN_PE19   (0x80 + 19)
+#define        AT91_PIN_PE20   (0x80 + 20)
+#define        AT91_PIN_PE21   (0x80 + 21)
+#define        AT91_PIN_PE22   (0x80 + 22)
+#define        AT91_PIN_PE23   (0x80 + 23)
+#define        AT91_PIN_PE24   (0x80 + 24)
+#define        AT91_PIN_PE25   (0x80 + 25)
+#define        AT91_PIN_PE26   (0x80 + 26)
+#define        AT91_PIN_PE27   (0x80 + 27)
+#define        AT91_PIN_PE28   (0x80 + 28)
+#define        AT91_PIN_PE29   (0x80 + 29)
+#define        AT91_PIN_PE30   (0x80 + 30)
+#define        AT91_PIN_PE31   (0x80 + 31)
+
+#ifndef __ASSEMBLY__
+/* setup setup routines, called from board init or driver probe() */
+extern int __init_or_module at91_set_GPIO_periph(unsigned pin, int use_pullup);
+extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup);
+extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup);
+extern int __init_or_module at91_set_C_periph(unsigned pin, int use_pullup);
+extern int __init_or_module at91_set_D_periph(unsigned pin, int use_pullup);
+extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup);
+extern int __init_or_module at91_set_gpio_output(unsigned pin, int value);
+extern int __init_or_module at91_set_deglitch(unsigned pin, int is_on);
+extern int __init_or_module at91_set_debounce(unsigned pin, int is_on, int div);
+extern int __init_or_module at91_set_multi_drive(unsigned pin, int is_on);
+extern int __init_or_module at91_set_pulldown(unsigned pin, int is_on);
+extern int __init_or_module at91_disable_schmitt_trig(unsigned pin);
+
+/* callable at any time */
+extern int at91_set_gpio_value(unsigned pin, int value);
+extern int at91_get_gpio_value(unsigned pin);
+
+/* callable only from core power-management code */
+extern void at91_gpio_suspend(void);
+extern void at91_gpio_resume(void);
+
+#endif /* __ASSEMBLY__ */
+
+#endif
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h
deleted file mode 100644 (file)
index 5fc2377..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * arch/arm/mach-at91/include/mach/gpio.h
- *
- *  Copyright (C) 2005 HP Labs
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
-
-#ifndef __ASM_ARCH_AT91RM9200_GPIO_H
-#define __ASM_ARCH_AT91RM9200_GPIO_H
-
-#include <linux/kernel.h>
-#include <asm/irq.h>
-
-#define MAX_GPIO_BANKS         5
-#define NR_BUILTIN_GPIO                (MAX_GPIO_BANKS * 32)
-
-/* these pin numbers double as IRQ numbers, like AT91xxx_ID_* values */
-
-#define        AT91_PIN_PA0    (0x00 + 0)
-#define        AT91_PIN_PA1    (0x00 + 1)
-#define        AT91_PIN_PA2    (0x00 + 2)
-#define        AT91_PIN_PA3    (0x00 + 3)
-#define        AT91_PIN_PA4    (0x00 + 4)
-#define        AT91_PIN_PA5    (0x00 + 5)
-#define        AT91_PIN_PA6    (0x00 + 6)
-#define        AT91_PIN_PA7    (0x00 + 7)
-#define        AT91_PIN_PA8    (0x00 + 8)
-#define        AT91_PIN_PA9    (0x00 + 9)
-#define        AT91_PIN_PA10   (0x00 + 10)
-#define        AT91_PIN_PA11   (0x00 + 11)
-#define        AT91_PIN_PA12   (0x00 + 12)
-#define        AT91_PIN_PA13   (0x00 + 13)
-#define        AT91_PIN_PA14   (0x00 + 14)
-#define        AT91_PIN_PA15   (0x00 + 15)
-#define        AT91_PIN_PA16   (0x00 + 16)
-#define        AT91_PIN_PA17   (0x00 + 17)
-#define        AT91_PIN_PA18   (0x00 + 18)
-#define        AT91_PIN_PA19   (0x00 + 19)
-#define        AT91_PIN_PA20   (0x00 + 20)
-#define        AT91_PIN_PA21   (0x00 + 21)
-#define        AT91_PIN_PA22   (0x00 + 22)
-#define        AT91_PIN_PA23   (0x00 + 23)
-#define        AT91_PIN_PA24   (0x00 + 24)
-#define        AT91_PIN_PA25   (0x00 + 25)
-#define        AT91_PIN_PA26   (0x00 + 26)
-#define        AT91_PIN_PA27   (0x00 + 27)
-#define        AT91_PIN_PA28   (0x00 + 28)
-#define        AT91_PIN_PA29   (0x00 + 29)
-#define        AT91_PIN_PA30   (0x00 + 30)
-#define        AT91_PIN_PA31   (0x00 + 31)
-
-#define        AT91_PIN_PB0    (0x20 + 0)
-#define        AT91_PIN_PB1    (0x20 + 1)
-#define        AT91_PIN_PB2    (0x20 + 2)
-#define        AT91_PIN_PB3    (0x20 + 3)
-#define        AT91_PIN_PB4    (0x20 + 4)
-#define        AT91_PIN_PB5    (0x20 + 5)
-#define        AT91_PIN_PB6    (0x20 + 6)
-#define        AT91_PIN_PB7    (0x20 + 7)
-#define        AT91_PIN_PB8    (0x20 + 8)
-#define        AT91_PIN_PB9    (0x20 + 9)
-#define        AT91_PIN_PB10   (0x20 + 10)
-#define        AT91_PIN_PB11   (0x20 + 11)
-#define        AT91_PIN_PB12   (0x20 + 12)
-#define        AT91_PIN_PB13   (0x20 + 13)
-#define        AT91_PIN_PB14   (0x20 + 14)
-#define        AT91_PIN_PB15   (0x20 + 15)
-#define        AT91_PIN_PB16   (0x20 + 16)
-#define        AT91_PIN_PB17   (0x20 + 17)
-#define        AT91_PIN_PB18   (0x20 + 18)
-#define        AT91_PIN_PB19   (0x20 + 19)
-#define        AT91_PIN_PB20   (0x20 + 20)
-#define        AT91_PIN_PB21   (0x20 + 21)
-#define        AT91_PIN_PB22   (0x20 + 22)
-#define        AT91_PIN_PB23   (0x20 + 23)
-#define        AT91_PIN_PB24   (0x20 + 24)
-#define        AT91_PIN_PB25   (0x20 + 25)
-#define        AT91_PIN_PB26   (0x20 + 26)
-#define        AT91_PIN_PB27   (0x20 + 27)
-#define        AT91_PIN_PB28   (0x20 + 28)
-#define        AT91_PIN_PB29   (0x20 + 29)
-#define        AT91_PIN_PB30   (0x20 + 30)
-#define        AT91_PIN_PB31   (0x20 + 31)
-
-#define        AT91_PIN_PC0    (0x40 + 0)
-#define        AT91_PIN_PC1    (0x40 + 1)
-#define        AT91_PIN_PC2    (0x40 + 2)
-#define        AT91_PIN_PC3    (0x40 + 3)
-#define        AT91_PIN_PC4    (0x40 + 4)
-#define        AT91_PIN_PC5    (0x40 + 5)
-#define        AT91_PIN_PC6    (0x40 + 6)
-#define        AT91_PIN_PC7    (0x40 + 7)
-#define        AT91_PIN_PC8    (0x40 + 8)
-#define        AT91_PIN_PC9    (0x40 + 9)
-#define        AT91_PIN_PC10   (0x40 + 10)
-#define        AT91_PIN_PC11   (0x40 + 11)
-#define        AT91_PIN_PC12   (0x40 + 12)
-#define        AT91_PIN_PC13   (0x40 + 13)
-#define        AT91_PIN_PC14   (0x40 + 14)
-#define        AT91_PIN_PC15   (0x40 + 15)
-#define        AT91_PIN_PC16   (0x40 + 16)
-#define        AT91_PIN_PC17   (0x40 + 17)
-#define        AT91_PIN_PC18   (0x40 + 18)
-#define        AT91_PIN_PC19   (0x40 + 19)
-#define        AT91_PIN_PC20   (0x40 + 20)
-#define        AT91_PIN_PC21   (0x40 + 21)
-#define        AT91_PIN_PC22   (0x40 + 22)
-#define        AT91_PIN_PC23   (0x40 + 23)
-#define        AT91_PIN_PC24   (0x40 + 24)
-#define        AT91_PIN_PC25   (0x40 + 25)
-#define        AT91_PIN_PC26   (0x40 + 26)
-#define        AT91_PIN_PC27   (0x40 + 27)
-#define        AT91_PIN_PC28   (0x40 + 28)
-#define        AT91_PIN_PC29   (0x40 + 29)
-#define        AT91_PIN_PC30   (0x40 + 30)
-#define        AT91_PIN_PC31   (0x40 + 31)
-
-#define        AT91_PIN_PD0    (0x60 + 0)
-#define        AT91_PIN_PD1    (0x60 + 1)
-#define        AT91_PIN_PD2    (0x60 + 2)
-#define        AT91_PIN_PD3    (0x60 + 3)
-#define        AT91_PIN_PD4    (0x60 + 4)
-#define        AT91_PIN_PD5    (0x60 + 5)
-#define        AT91_PIN_PD6    (0x60 + 6)
-#define        AT91_PIN_PD7    (0x60 + 7)
-#define        AT91_PIN_PD8    (0x60 + 8)
-#define        AT91_PIN_PD9    (0x60 + 9)
-#define        AT91_PIN_PD10   (0x60 + 10)
-#define        AT91_PIN_PD11   (0x60 + 11)
-#define        AT91_PIN_PD12   (0x60 + 12)
-#define        AT91_PIN_PD13   (0x60 + 13)
-#define        AT91_PIN_PD14   (0x60 + 14)
-#define        AT91_PIN_PD15   (0x60 + 15)
-#define        AT91_PIN_PD16   (0x60 + 16)
-#define        AT91_PIN_PD17   (0x60 + 17)
-#define        AT91_PIN_PD18   (0x60 + 18)
-#define        AT91_PIN_PD19   (0x60 + 19)
-#define        AT91_PIN_PD20   (0x60 + 20)
-#define        AT91_PIN_PD21   (0x60 + 21)
-#define        AT91_PIN_PD22   (0x60 + 22)
-#define        AT91_PIN_PD23   (0x60 + 23)
-#define        AT91_PIN_PD24   (0x60 + 24)
-#define        AT91_PIN_PD25   (0x60 + 25)
-#define        AT91_PIN_PD26   (0x60 + 26)
-#define        AT91_PIN_PD27   (0x60 + 27)
-#define        AT91_PIN_PD28   (0x60 + 28)
-#define        AT91_PIN_PD29   (0x60 + 29)
-#define        AT91_PIN_PD30   (0x60 + 30)
-#define        AT91_PIN_PD31   (0x60 + 31)
-
-#define        AT91_PIN_PE0    (0x80 + 0)
-#define        AT91_PIN_PE1    (0x80 + 1)
-#define        AT91_PIN_PE2    (0x80 + 2)
-#define        AT91_PIN_PE3    (0x80 + 3)
-#define        AT91_PIN_PE4    (0x80 + 4)
-#define        AT91_PIN_PE5    (0x80 + 5)
-#define        AT91_PIN_PE6    (0x80 + 6)
-#define        AT91_PIN_PE7    (0x80 + 7)
-#define        AT91_PIN_PE8    (0x80 + 8)
-#define        AT91_PIN_PE9    (0x80 + 9)
-#define        AT91_PIN_PE10   (0x80 + 10)
-#define        AT91_PIN_PE11   (0x80 + 11)
-#define        AT91_PIN_PE12   (0x80 + 12)
-#define        AT91_PIN_PE13   (0x80 + 13)
-#define        AT91_PIN_PE14   (0x80 + 14)
-#define        AT91_PIN_PE15   (0x80 + 15)
-#define        AT91_PIN_PE16   (0x80 + 16)
-#define        AT91_PIN_PE17   (0x80 + 17)
-#define        AT91_PIN_PE18   (0x80 + 18)
-#define        AT91_PIN_PE19   (0x80 + 19)
-#define        AT91_PIN_PE20   (0x80 + 20)
-#define        AT91_PIN_PE21   (0x80 + 21)
-#define        AT91_PIN_PE22   (0x80 + 22)
-#define        AT91_PIN_PE23   (0x80 + 23)
-#define        AT91_PIN_PE24   (0x80 + 24)
-#define        AT91_PIN_PE25   (0x80 + 25)
-#define        AT91_PIN_PE26   (0x80 + 26)
-#define        AT91_PIN_PE27   (0x80 + 27)
-#define        AT91_PIN_PE28   (0x80 + 28)
-#define        AT91_PIN_PE29   (0x80 + 29)
-#define        AT91_PIN_PE30   (0x80 + 30)
-#define        AT91_PIN_PE31   (0x80 + 31)
-
-#ifndef __ASSEMBLY__
-/* setup setup routines, called from board init or driver probe() */
-extern int __init_or_module at91_set_GPIO_periph(unsigned pin, int use_pullup);
-extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup);
-extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup);
-extern int __init_or_module at91_set_C_periph(unsigned pin, int use_pullup);
-extern int __init_or_module at91_set_D_periph(unsigned pin, int use_pullup);
-extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup);
-extern int __init_or_module at91_set_gpio_output(unsigned pin, int value);
-extern int __init_or_module at91_set_deglitch(unsigned pin, int is_on);
-extern int __init_or_module at91_set_debounce(unsigned pin, int is_on, int div);
-extern int __init_or_module at91_set_multi_drive(unsigned pin, int is_on);
-extern int __init_or_module at91_set_pulldown(unsigned pin, int is_on);
-extern int __init_or_module at91_disable_schmitt_trig(unsigned pin);
-
-/* callable at any time */
-extern int at91_set_gpio_value(unsigned pin, int value);
-extern int at91_get_gpio_value(unsigned pin);
-
-/* callable only from core power-management code */
-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
index f17aa3150019bfe3e16ed1fa67e48a434f9c12ae..56338245653aea10f094ec765f0d9afdb99ae580 100644 (file)
 /* 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
index 3e22978b5547a0eb80638a9f495f970e5da4d10e..77c4d8fd03fd56c0ee04ad1b64212f56f83fe015 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/platform_device.h>
 
 #include "board.h"
+#include "gpio.h"
 
 
 /* ------------------------------------------------------------------------- */
index 8bda1cefdf96ad500f84641cbcb8fa300c3b13df..e95554532987e431ae509d47aa8f4f0dc70833e6 100644 (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.
This page took 0.044071 seconds and 5 git commands to generate.