aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2012-08-28 14:06:41 -0400
committerRob Herring <rob.herring@calxeda.com>2012-09-14 10:21:59 -0400
commit01464226ac6089bd6a33f9899cc792c2355ebf39 (patch)
tree8f241525ea0c3e39d9188299b091b39c04bcb295
parentce91574c202b8581ad15bfb1427af824f462c3d2 (diff)
ARM: make mach/gpio.h headers optional
Most platforms don't need mach/gpio.h and it prevents multi-platform kernel images. Add CONFIG_NEED_MACH_GPIO_H and make platforns select it if they need gpio.h. This is platforms that define __GPIOLIB_COMPLEX or have lots of implicit includes pulled in by mach/gpio.h. at91 and omap have gpio clean-up pending and can drop CONFIG_NEED_MACH_GPIO_H once that is in. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Russell King <linux@arm.linux.org.uk> Acked-by: Jason Cooper <jason@lakedaemon.net> Acked-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--arch/arm/Kconfig21
-rw-r--r--arch/arm/include/asm/gpio.h2
-rw-r--r--arch/arm/mach-dove/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-ep93xx/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-highbank/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-kirkwood/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-msm/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-mxs/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-nomadik/include/mach/gpio.h4
-rw-r--r--arch/arm/mach-orion5x/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-picoxcell/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-realview/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-shmobile/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-spear13xx/include/mach/gpio.h19
-rw-r--r--arch/arm/mach-spear3xx/include/mach/gpio.h19
-rw-r--r--arch/arm/mach-spear6xx/include/mach/gpio.h19
-rw-r--r--arch/arm/mach-tegra/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-u300/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-ux500/include/mach/gpio.h5
-rw-r--r--arch/arm/mach-versatile/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-vexpress/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-vt8500/include/mach/gpio.h1
-rw-r--r--arch/arm/plat-mxc/include/mach/gpio.h1
-rw-r--r--arch/arm/plat-spear/include/plat/gpio.h1
25 files changed, 23 insertions, 85 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c5f9ae5dbd1a..4f5652d7bfa0 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -202,6 +202,13 @@ config ARM_PATCH_PHYS_VIRT
202 this feature (eg, building a kernel for a single machine) and 202 this feature (eg, building a kernel for a single machine) and
203 you need to shrink the kernel to the minimal size. 203 you need to shrink the kernel to the minimal size.
204 204
205config NEED_MACH_GPIO_H
206 bool
207 help
208 Select this when mach/gpio.h is required to provide special
209 definitions for this platform. The need for mach/gpio.h should
210 be avoided when possible.
211
205config NEED_MACH_IO_H 212config NEED_MACH_IO_H
206 bool 213 bool
207 help 214 help
@@ -345,6 +352,7 @@ config ARCH_AT91
345 select HAVE_CLK 352 select HAVE_CLK
346 select CLKDEV_LOOKUP 353 select CLKDEV_LOOKUP
347 select IRQ_DOMAIN 354 select IRQ_DOMAIN
355 select NEED_MACH_GPIO_H
348 select NEED_MACH_IO_H if PCCARD 356 select NEED_MACH_IO_H if PCCARD
349 help 357 help
350 This enables support for systems based on Atmel 358 This enables support for systems based on Atmel
@@ -523,6 +531,7 @@ config ARCH_IOP32X
523 bool "IOP32x-based" 531 bool "IOP32x-based"
524 depends on MMU 532 depends on MMU
525 select CPU_XSCALE 533 select CPU_XSCALE
534 select NEED_MACH_GPIO_H
526 select NEED_MACH_IO_H 535 select NEED_MACH_IO_H
527 select NEED_RET_TO_USER 536 select NEED_RET_TO_USER
528 select PLAT_IOP 537 select PLAT_IOP
@@ -536,6 +545,7 @@ config ARCH_IOP33X
536 bool "IOP33x-based" 545 bool "IOP33x-based"
537 depends on MMU 546 depends on MMU
538 select CPU_XSCALE 547 select CPU_XSCALE
548 select NEED_MACH_GPIO_H
539 select NEED_MACH_IO_H 549 select NEED_MACH_IO_H
540 select NEED_RET_TO_USER 550 select NEED_RET_TO_USER
541 select PLAT_IOP 551 select PLAT_IOP
@@ -645,6 +655,7 @@ config ARCH_MMP
645 select PLAT_PXA 655 select PLAT_PXA
646 select SPARSE_IRQ 656 select SPARSE_IRQ
647 select GENERIC_ALLOCATOR 657 select GENERIC_ALLOCATOR
658 select NEED_MACH_GPIO_H
648 help 659 help
649 Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line. 660 Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line.
650 661
@@ -733,6 +744,7 @@ config ARCH_PXA
733 select MULTI_IRQ_HANDLER 744 select MULTI_IRQ_HANDLER
734 select ARM_CPU_SUSPEND if PM 745 select ARM_CPU_SUSPEND if PM
735 select HAVE_IDE 746 select HAVE_IDE
747 select NEED_MACH_GPIO_H
736 help 748 help
737 Support for Intel/Marvell's PXA2xx/PXA3xx processor line. 749 Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
738 750
@@ -795,6 +807,7 @@ config ARCH_SA1100
795 select CLKDEV_LOOKUP 807 select CLKDEV_LOOKUP
796 select ARCH_REQUIRE_GPIOLIB 808 select ARCH_REQUIRE_GPIOLIB
797 select HAVE_IDE 809 select HAVE_IDE
810 select NEED_MACH_GPIO_H
798 select NEED_MACH_MEMORY_H 811 select NEED_MACH_MEMORY_H
799 select SPARSE_IRQ 812 select SPARSE_IRQ
800 help 813 help
@@ -810,6 +823,7 @@ config ARCH_S3C24XX
810 select HAVE_S3C2410_I2C if I2C 823 select HAVE_S3C2410_I2C if I2C
811 select HAVE_S3C_RTC if RTC_CLASS 824 select HAVE_S3C_RTC if RTC_CLASS
812 select HAVE_S3C2410_WATCHDOG if WATCHDOG 825 select HAVE_S3C2410_WATCHDOG if WATCHDOG
826 select NEED_MACH_GPIO_H
813 select NEED_MACH_IO_H 827 select NEED_MACH_IO_H
814 help 828 help
815 Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443 829 Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443
@@ -837,6 +851,7 @@ config ARCH_S3C64XX
837 select SAMSUNG_GPIOLIB_4BIT 851 select SAMSUNG_GPIOLIB_4BIT
838 select HAVE_S3C2410_I2C if I2C 852 select HAVE_S3C2410_I2C if I2C
839 select HAVE_S3C2410_WATCHDOG if WATCHDOG 853 select HAVE_S3C2410_WATCHDOG if WATCHDOG
854 select NEED_MACH_GPIO_H
840 help 855 help
841 Samsung S3C64XX series based systems 856 Samsung S3C64XX series based systems
842 857
@@ -851,6 +866,7 @@ config ARCH_S5P64X0
851 select GENERIC_CLOCKEVENTS 866 select GENERIC_CLOCKEVENTS
852 select HAVE_S3C2410_I2C if I2C 867 select HAVE_S3C2410_I2C if I2C
853 select HAVE_S3C_RTC if RTC_CLASS 868 select HAVE_S3C_RTC if RTC_CLASS
869 select NEED_MACH_GPIO_H
854 help 870 help
855 Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440, 871 Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440,
856 SMDK6450. 872 SMDK6450.
@@ -865,6 +881,7 @@ config ARCH_S5PC100
865 select HAVE_S3C2410_I2C if I2C 881 select HAVE_S3C2410_I2C if I2C
866 select HAVE_S3C_RTC if RTC_CLASS 882 select HAVE_S3C_RTC if RTC_CLASS
867 select HAVE_S3C2410_WATCHDOG if WATCHDOG 883 select HAVE_S3C2410_WATCHDOG if WATCHDOG
884 select NEED_MACH_GPIO_H
868 help 885 help
869 Samsung S5PC100 series based systems 886 Samsung S5PC100 series based systems
870 887
@@ -882,6 +899,7 @@ config ARCH_S5PV210
882 select HAVE_S3C2410_I2C if I2C 899 select HAVE_S3C2410_I2C if I2C
883 select HAVE_S3C_RTC if RTC_CLASS 900 select HAVE_S3C_RTC if RTC_CLASS
884 select HAVE_S3C2410_WATCHDOG if WATCHDOG 901 select HAVE_S3C2410_WATCHDOG if WATCHDOG
902 select NEED_MACH_GPIO_H
885 select NEED_MACH_MEMORY_H 903 select NEED_MACH_MEMORY_H
886 help 904 help
887 Samsung S5PV210/S5PC110 series based systems 905 Samsung S5PV210/S5PC110 series based systems
@@ -899,6 +917,7 @@ config ARCH_EXYNOS
899 select HAVE_S3C_RTC if RTC_CLASS 917 select HAVE_S3C_RTC if RTC_CLASS
900 select HAVE_S3C2410_I2C if I2C 918 select HAVE_S3C2410_I2C if I2C
901 select HAVE_S3C2410_WATCHDOG if WATCHDOG 919 select HAVE_S3C2410_WATCHDOG if WATCHDOG
920 select NEED_MACH_GPIO_H
902 select NEED_MACH_MEMORY_H 921 select NEED_MACH_MEMORY_H
903 help 922 help
904 Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) 923 Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
@@ -971,6 +990,7 @@ config ARCH_DAVINCI
971 select GENERIC_ALLOCATOR 990 select GENERIC_ALLOCATOR
972 select GENERIC_IRQ_CHIP 991 select GENERIC_IRQ_CHIP
973 select ARCH_HAS_HOLES_MEMORYMODEL 992 select ARCH_HAS_HOLES_MEMORYMODEL
993 select NEED_MACH_GPIO_H
974 help 994 help
975 Support for TI's DaVinci platform. 995 Support for TI's DaVinci platform.
976 996
@@ -983,6 +1003,7 @@ config ARCH_OMAP
983 select CLKSRC_MMIO 1003 select CLKSRC_MMIO
984 select GENERIC_CLOCKEVENTS 1004 select GENERIC_CLOCKEVENTS
985 select ARCH_HAS_HOLES_MEMORYMODEL 1005 select ARCH_HAS_HOLES_MEMORYMODEL
1006 select NEED_MACH_GPIO_H
986 help 1007 help
987 Support for TI's OMAP platform (OMAP1/2/3/4). 1008 Support for TI's OMAP platform (OMAP1/2/3/4).
988 1009
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
index c402e9b31f4c..477e0206e016 100644
--- a/arch/arm/include/asm/gpio.h
+++ b/arch/arm/include/asm/gpio.h
@@ -6,7 +6,9 @@
6#endif 6#endif
7 7
8/* not all ARM platforms necessarily support this API ... */ 8/* not all ARM platforms necessarily support this API ... */
9#ifdef CONFIG_NEED_MACH_GPIO_H
9#include <mach/gpio.h> 10#include <mach/gpio.h>
11#endif
10 12
11#ifndef __ARM_GPIOLIB_COMPLEX 13#ifndef __ARM_GPIOLIB_COMPLEX
12/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */ 14/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
diff --git a/arch/arm/mach-dove/include/mach/gpio.h b/arch/arm/mach-dove/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-dove/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-ep93xx/include/mach/gpio.h b/arch/arm/mach-ep93xx/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-ep93xx/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-highbank/include/mach/gpio.h b/arch/arm/mach-highbank/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-highbank/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-ixp4xx/include/mach/gpio.h b/arch/arm/mach-ixp4xx/include/mach/gpio.h
deleted file mode 100644
index ef37f2635b0e..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/gpio.h
+++ /dev/null
@@ -1,2 +0,0 @@
1/* empty */
2
diff --git a/arch/arm/mach-kirkwood/include/mach/gpio.h b/arch/arm/mach-kirkwood/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-kirkwood/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-msm/include/mach/gpio.h b/arch/arm/mach-msm/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-msm/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-mxs/include/mach/gpio.h b/arch/arm/mach-mxs/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-mxs/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-nomadik/include/mach/gpio.h b/arch/arm/mach-nomadik/include/mach/gpio.h
deleted file mode 100644
index efdde0ae0a4f..000000000000
--- a/arch/arm/mach-nomadik/include/mach/gpio.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef __ASM_ARCH_GPIO_H
2#define __ASM_ARCH_GPIO_H
3
4#endif /* __ASM_ARCH_GPIO_H */
diff --git a/arch/arm/mach-orion5x/include/mach/gpio.h b/arch/arm/mach-orion5x/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-orion5x/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-picoxcell/include/mach/gpio.h b/arch/arm/mach-picoxcell/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-picoxcell/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-realview/include/mach/gpio.h b/arch/arm/mach-realview/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-realview/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-shmobile/include/mach/gpio.h b/arch/arm/mach-shmobile/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-shmobile/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-spear13xx/include/mach/gpio.h b/arch/arm/mach-spear13xx/include/mach/gpio.h
deleted file mode 100644
index 85f176311f63..000000000000
--- a/arch/arm/mach-spear13xx/include/mach/gpio.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-spear13xx/include/mach/gpio.h
3 *
4 * GPIO macros for SPEAr13xx machine family
5 *
6 * Copyright (C) 2012 ST Microelectronics
7 * Viresh Kumar <viresh.linux@gmail.com>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef __MACH_GPIO_H
15#define __MACH_GPIO_H
16
17#include <plat/gpio.h>
18
19#endif /* __MACH_GPIO_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/gpio.h b/arch/arm/mach-spear3xx/include/mach/gpio.h
deleted file mode 100644
index 2ac74c6db7f1..000000000000
--- a/arch/arm/mach-spear3xx/include/mach/gpio.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-spear3xx/include/mach/gpio.h
3 *
4 * GPIO macros for SPEAr3xx machine family
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Viresh Kumar<viresh.linux@gmail.com>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef __MACH_GPIO_H
15#define __MACH_GPIO_H
16
17#include <plat/gpio.h>
18
19#endif /* __MACH_GPIO_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/gpio.h b/arch/arm/mach-spear6xx/include/mach/gpio.h
deleted file mode 100644
index d42cefc0356d..000000000000
--- a/arch/arm/mach-spear6xx/include/mach/gpio.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-spear6xx/include/mach/gpio.h
3 *
4 * GPIO macros for SPEAr6xx machine family
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Viresh Kumar <viresh.linux@gmail.com>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef __MACH_GPIO_H
15#define __MACH_GPIO_H
16
17#include <plat/gpio.h>
18
19#endif /* __MACH_GPIO_H */
diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-tegra/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-u300/include/mach/gpio.h b/arch/arm/mach-u300/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-u300/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-ux500/include/mach/gpio.h b/arch/arm/mach-ux500/include/mach/gpio.h
deleted file mode 100644
index c01ef66537f3..000000000000
--- a/arch/arm/mach-ux500/include/mach/gpio.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifndef __ASM_ARCH_GPIO_H
2#define __ASM_ARCH_GPIO_H
3
4
5#endif /* __ASM_ARCH_GPIO_H */
diff --git a/arch/arm/mach-versatile/include/mach/gpio.h b/arch/arm/mach-versatile/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-versatile/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-vexpress/include/mach/gpio.h b/arch/arm/mach-vexpress/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-vexpress/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-vt8500/include/mach/gpio.h b/arch/arm/mach-vt8500/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-vt8500/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/plat-mxc/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/plat-spear/include/plat/gpio.h b/arch/arm/plat-spear/include/plat/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/plat-spear/include/plat/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */