Skip to contentSkip to conversation

ARM: at91: localize GPIO header

PATCH Superseded Linus Walleij 3 participants 3 messages Mar 27, 2014 – May 6, 2014

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
This version is rebased on top of the timex-remove branch in the ARM SoC tree. I have done a few trial compilations with the defconfigs after rebasing but more may still be needed. IIRC one of the board files is now removed from the mainline kernel so there will be some simple merge conflict wherever it gets merged.

If you're happy with this I'd suggest applying it directly in the ARM SoC tree.

---
 arch/arm/Kconfig                         |   1 -
 arch/arm/mach-at91/at91rm9200_devices.c  |   1 +
 arch/arm/mach-at91/at91sam9260_devices.c |   2 +-
 arch/arm/mach-at91/at91sam9261_devices.c |   2 +-
 arch/arm/mach-at91/at91sam9263_devices.c |   1 +
 arch/arm/mach-at91/at91sam9g45_devices.c |   1 +
 arch/arm/mach-at91/at91sam9rl_devices.c  |   1 +
 arch/arm/mach-at91/board-1arm.c          |   2 +-
 arch/arm/mach-at91/board-afeb-9260v1.c   |   1 +
 arch/arm/mach-at91/board-cam60.c         |   1 +
 arch/arm/mach-at91/board-carmeva.c       |   1 +
 arch/arm/mach-at91/board-cpu9krea.c      |   1 +
 arch/arm/mach-at91/board-cpuat91.c       |   2 +
 arch/arm/mach-at91/board-csb337.c        |   2 +-
 arch/arm/mach-at91/board-csb637.c        |   1 +
 arch/arm/mach-at91/board-eb9200.c        |   1 +
 arch/arm/mach-at91/board-ecbat91.c       |   1 +
 arch/arm/mach-at91/board-eco920.c        |   2 +
 arch/arm/mach-at91/board-flexibity.c     |   1 +
 arch/arm/mach-at91/board-foxg20.c        |   1 +
 arch/arm/mach-at91/board-gsia18s.c       |   1 +
 arch/arm/mach-at91/board-kafa.c          |   1 +
 arch/arm/mach-at91/board-kb9202.c        |   1 +
 arch/arm/mach-at91/board-pcontrol-g20.c  |   1 +
 arch/arm/mach-at91/board-picotux200.c    |   1 +
 arch/arm/mach-at91/board-qil-a9260.c     |   2 +-
 arch/arm/mach-at91/board-rm9200ek.c      |   1 +
 arch/arm/mach-at91/board-sam9-l9260.c    |   1 +
 arch/arm/mach-at91/board-sam9260ek.c     |   1 +
 arch/arm/mach-at91/board-sam9261ek.c     |   1 +
 arch/arm/mach-at91/board-sam9263ek.c     |   1 +
 arch/arm/mach-at91/board-sam9g20ek.c     |   1 +
 arch/arm/mach-at91/board-sam9m10g45ek.c  |   1 +
 arch/arm/mach-at91/board-sam9rlek.c      |   1 +
 arch/arm/mach-at91/board-snapper9260.c   |   1 +
 arch/arm/mach-at91/board-stamp9g20.c     |   1 +
 arch/arm/mach-at91/board-yl-9200.c       |   1 +
 arch/arm/mach-at91/gpio.c                |   1 +
 arch/arm/mach-at91/gpio.h                | 222 +++++++++++++++++++++++++++++++
 arch/arm/mach-at91/include/mach/gpio.h   | 222 -------------------------------
 arch/arm/mach-at91/leds.c                |   1 +
 arch/arm/mach-at91/pm.c                  |   1 +
 42 files changed, 263 insertions(+), 228 deletions(-)
 create mode 100644 arch/arm/mach-at91/gpio.h
 delete mode 100644 arch/arm/mach-at91/include/mach/gpio.h
arch/arm/Kconfig +0 -1
index c1f1a7eee953..2d472c4e7ceb 100644
@@ -365,7 +365,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
arch/arm/mach-at91/at91rm9200_devices.c +1 -0
index f3f19f21352a..4860918b411e 100644
@@ -25,6 +25,7 @@
 
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 /* --------------------------------------------------------------------
arch/arm/mach-at91/at91sam9260_devices.c +1 -1
index 2ae7715f1309..02f24890848b 100644
@@ -29,7 +29,7 @@
 
 #include "board.h"
 #include "generic.h"
-
+#include "gpio.h"
 
 /* --------------------------------------------------------------------
  *  USB Host
arch/arm/mach-at91/at91sam9261_devices.c +1 -1
index 80e35895d28f..43b21f456f6e 100644
@@ -29,7 +29,7 @@
 
 #include "board.h"
 #include "generic.h"
-
+#include "gpio.h"
 
 /* --------------------------------------------------------------------
  *  USB Host
arch/arm/mach-at91/at91sam9263_devices.c +1 -0
index 43d53d6156dd..953616e5dbcb 100644
@@ -28,6 +28,7 @@
 
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 /* --------------------------------------------------------------------
arch/arm/mach-at91/at91sam9g45_devices.c +1 -0
index 77b04c2edd78..69e01adf5d99 100644
@@ -39,6 +39,7 @@
 #include "board.h"
 #include "generic.h"
 #include "clock.h"
+#include "gpio.h"
 
 
 /* --------------------------------------------------------------------
arch/arm/mach-at91/at91sam9rl_devices.c +1 -0
index 428fc412aaf1..ba7ebd9dd4bb 100644
@@ -26,6 +26,7 @@
 
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 /* --------------------------------------------------------------------
arch/arm/mach-at91/board-1arm.c +1 -1
index 35ab632bbf68..3f6dbcc34022 100644
@@ -39,7 +39,7 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
-
+#include "gpio.h"
 
 static void __init onearm_init_early(void)
 {
arch/arm/mach-at91/board-afeb-9260v1.c +1 -0
index f95e31cda4b3..597c649170aa 100644
@@ -46,6 +46,7 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init afeb9260_init_early(void)
arch/arm/mach-at91/board-cam60.c +1 -0
index 112e867c4abe..a30502c8d379 100644
@@ -44,6 +44,7 @@
 #include "board.h"
 #include "sam9_smc.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init cam60_init_early(void)
arch/arm/mach-at91/board-carmeva.c +1 -0
index 92983050a9bd..47313d3ee037 100644
@@ -39,6 +39,7 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init carmeva_init_early(void)
arch/arm/mach-at91/board-cpu9krea.c +1 -0
index 008527efdbcf..2037f78c84e7 100644
@@ -48,6 +48,7 @@
 #include "board.h"
 #include "sam9_smc.h"
 #include "generic.h"
+#include "gpio.h"
 
 static void __init cpu9krea_init_early(void)
 {
arch/arm/mach-at91/board-cpuat91.c +2 -0
index 42f1353a4baf..c094350c9314 100644
@@ -43,6 +43,8 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
+
 
 static struct gpio_led cpuat91_leds[] = {
 	{
arch/arm/mach-at91/board-csb337.c +1 -1
index e5fde215225b..0e35a45cf8d4 100644
@@ -42,7 +42,7 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
-
+#include "gpio.h"
 
 static void __init csb337_init_early(void)
 {
arch/arm/mach-at91/board-csb637.c +1 -0
index fdf11061c577..18d027f529a8 100644
@@ -39,6 +39,7 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init csb637_init_early(void)
arch/arm/mach-at91/board-eb9200.c +1 -0
index f9be8161bbfa..aa457a8b22f5 100644
@@ -38,6 +38,7 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init eb9200_init_early(void)
arch/arm/mach-at91/board-ecbat91.c +1 -0
index b2fcd71262ba..ede1373ccaba 100644
@@ -42,6 +42,7 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init ecb_at91init_early(void)
arch/arm/mach-at91/board-eco920.c +2 -0
index 77de410efc90..4e75321a8f2a 100644
@@ -31,6 +31,8 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
+
 
 static void __init eco920_init_early(void)
 {
arch/arm/mach-at91/board-flexibity.c +1 -0
index 737c08563628..68f1ab6bd08f 100644
@@ -37,6 +37,7 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 static void __init flexibity_init_early(void)
 {
arch/arm/mach-at91/board-foxg20.c +1 -0
index c20a870ea9c9..8b22c60bb238 100644
@@ -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
arch/arm/mach-at91/board-gsia18s.c +1 -0
index 416bae8435ee..b729dd1271bf 100644
@@ -39,6 +39,7 @@
 #include "generic.h"
 #include "gsia18s.h"
 #include "stamp9g20.h"
+#include "gpio.h"
 
 static void __init gsia18s_init_early(void)
 {
arch/arm/mach-at91/board-kafa.c +1 -0
index 88e2f5d2d16d..93b1df42f639 100644
@@ -39,6 +39,7 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init kafa_init_early(void)
arch/arm/mach-at91/board-kb9202.c +1 -0
index 0c519d9ebffc..d58d36225e08 100644
@@ -42,6 +42,7 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init kb9202_init_early(void)
arch/arm/mach-at91/board-pcontrol-g20.c +1 -0
index 5f25fa54eb93..b48d95ec5152 100644
@@ -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)
arch/arm/mach-at91/board-picotux200.c +1 -0
index ab2b2ec36c14..2c0f2d554d84 100644
@@ -43,6 +43,7 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init picotux200_init_early(void)
arch/arm/mach-at91/board-qil-a9260.c +1 -1
index aa3bc9b0f150..a35a9c2ebcb0 100644
@@ -47,7 +47,7 @@
 #include "board.h"
 #include "sam9_smc.h"
 #include "generic.h"
-
+#include "gpio.h"
 
 static void __init ek_init_early(void)
 {
arch/arm/mach-at91/board-rm9200ek.c +1 -0
index 8b17dadc1aba..953cea416754 100644
@@ -45,6 +45,7 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init ek_init_early(void)
arch/arm/mach-at91/board-sam9-l9260.c +1 -0
index 43ee4dc43b50..d24dda67e2d3 100644
@@ -43,6 +43,7 @@
 #include "board.h"
 #include "sam9_smc.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init ek_init_early(void)
arch/arm/mach-at91/board-sam9260ek.c +1 -0
index f4f8735315da..65dea12d685e 100644
@@ -49,6 +49,7 @@
 #include "board.h"
 #include "sam9_smc.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init ek_init_early(void)
arch/arm/mach-at91/board-sam9261ek.c +1 -0
index 473546b9408b..4637432de08f 100644
@@ -53,6 +53,7 @@
 #include "board.h"
 #include "sam9_smc.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init ek_init_early(void)
arch/arm/mach-at91/board-sam9263ek.c +1 -0
index 2f931915c80c..cd2726ee5add 100644
@@ -52,6 +52,7 @@
 #include "board.h"
 #include "sam9_smc.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init ek_init_early(void)
arch/arm/mach-at91/board-sam9g20ek.c +1 -0
index f9cd1f2c7146..e1be6e25b380 100644
@@ -50,6 +50,7 @@
 #include "board.h"
 #include "sam9_smc.h"
 #include "generic.h"
+#include "gpio.h"
 
 /*
  * board revision encoding
arch/arm/mach-at91/board-sam9m10g45ek.c +1 -0
index ef39078c8ce2..5cd95ede623e 100644
@@ -50,6 +50,7 @@
 #include "board.h"
 #include "sam9_smc.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init ek_init_early(void)
arch/arm/mach-at91/board-sam9rlek.c +1 -0
index 604eecf6cd70..6b81e4671646 100644
@@ -38,6 +38,7 @@
 #include "board.h"
 #include "sam9_smc.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init ek_init_early(void)
arch/arm/mach-at91/board-snapper9260.c +1 -0
index f1d49e929ccb..1b870e6def0c 100644
@@ -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))
 
arch/arm/mach-at91/board-stamp9g20.c +1 -0
index e4a5ac17cdbc..3b575036ff96 100644
@@ -32,6 +32,7 @@
 #include "board.h"
 #include "sam9_smc.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 void __init stamp9g20_init_early(void)
arch/arm/mach-at91/board-yl-9200.c +1 -0
index be083771df2e..46fdb0c68a68 100644
@@ -50,6 +50,7 @@
 #include "at91_aic.h"
 #include "board.h"
 #include "generic.h"
+#include "gpio.h"
 
 
 static void __init yl9200_init_early(void)
arch/arm/mach-at91/gpio.c +1 -0
index a5afcf76550e..12ed05bbdc5c 100644
@@ -29,6 +29,7 @@
 #include <mach/at91_pio.h>
 
 #include "generic.h"
+#include "gpio.h"
 
 #define MAX_NB_GPIO_PER_BANK	32
 
arch/arm/mach-at91/gpio.h new file +222 -0

222 lines not on this page · raw message

arch/arm/mach-at91/include/mach/gpio.h deleted +0 -222

222 lines not on this page · raw message

arch/arm/mach-at91/leds.c +1 -0
index 3e22978b5547..77c4d8fd03fd 100644
@@ -16,6 +16,7 @@
 #include <linux/platform_device.h>
 
 #include "board.h"
+#include "gpio.h"
 
 
 /* ------------------------------------------------------------------------- */
arch/arm/mach-at91/pm.c +1 -0
index 7afecb8a35b1..cc8ca6574e50 100644
@@ -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.
Signature · 1 line
1.8.5.3
#1 lore raw

PATCH 1/1 ARM: at91: localize GPIO header

Quoted 18 lines · Linus Walleij

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.

---
This version is rebased on top of the timex-remove branch in the ARM SoC tree. I have done a few trial compilations with the defconfigs after rebasing but more may still be needed. IIRC one of the board files is now removed from the mainline kernel so there will be some simple merge conflict wherever it gets merged.

Quoted 2 lines

If you're happy with this I'd suggest applying it directly in the ARM SoC tree.

Looks like this one didn't make it for 3.15 given timing. Want to respin for 3.16 to handle the above conflicts and send to Nicolas?

-Olof

#2 lore raw

PATCH 1/1 ARM: at91: localize GPIO header

On 04/05/2014 20:56, Olof Johansson :

Quoted 19 lines · Linus Walleij
Quoted 18 lines

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.

---
This version is rebased on top of the timex-remove branch in the ARM SoC tree. I have done a few trial compilations with the defconfigs after rebasing but more may still be needed. IIRC one of the board files is now removed from the mainline kernel so there will be some simple merge conflict wherever it gets merged.

Quoted 5 lines
Quoted 2 lines

If you're happy with this I'd suggest applying it directly in the ARM SoC tree.

Looks like this one didn't make it for 3.15 given timing. Want to respin for 3.16 to handle the above conflicts and send to Nicolas?

I already did it actually no need to worry Linus: It sits in my at91-3.16-cleanup branch that I didn't send to arm-soc yet.

I'll try to collect all "cleanup" stuff today or tomorrow and send the pull-request soon.

Thanks for the heads-up Olof.

Bye,

Signature · 1 line
Nicolas Ferre