aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-02-27 15:44:40 -0500
committerArnd Bergmann <arnd@arndb.de>2015-12-01 15:50:26 -0500
commitb28210421c329766275b020ffeadce0a4e9d551f (patch)
tree32768b13d3fec7cd8bda0f18c4427e06a1af4be2
parentaf37eec0653128e991d20b8c1fc763ed1cde96c7 (diff)
ARM: s3c64xx: allow building without board support
Most of the code for the s3c64xx platform is only used when booting with ATAGS based board files, but not when using device-tree. This tries to identify all the s3c64xx specific code that is unneeded when CONFIG_ATAGS is not set, so we can build a smaller DT-only kernel if configured that way. All board support is still left intact but now depends on the CONFIG_ATAGS symbol that users may intentionally disable. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--arch/arm/mach-s3c64xx/Kconfig19
-rw-r--r--arch/arm/mach-s3c64xx/Makefile21
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/gpio-samsung.h3
-rw-r--r--arch/arm/plat-samsung/pm.c4
4 files changed, 29 insertions, 18 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index caf71a99389e..7c0c420c3016 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -7,18 +7,17 @@ menuconfig ARCH_S3C64XX
7 select ARCH_REQUIRE_GPIOLIB 7 select ARCH_REQUIRE_GPIOLIB
8 select ARM_AMBA 8 select ARM_AMBA
9 select ARM_VIC 9 select ARM_VIC
10 select ATAGS
11 select CLKSRC_SAMSUNG_PWM 10 select CLKSRC_SAMSUNG_PWM
12 select COMMON_CLK_SAMSUNG 11 select COMMON_CLK_SAMSUNG
13 select GPIO_SAMSUNG 12 select GPIO_SAMSUNG if ATAGS
14 select HAVE_S3C2410_I2C if I2C 13 select HAVE_S3C2410_I2C if I2C
15 select HAVE_S3C2410_WATCHDOG if WATCHDOG 14 select HAVE_S3C2410_WATCHDOG if WATCHDOG
16 select HAVE_TCM 15 select HAVE_TCM
17 select PLAT_SAMSUNG 16 select PLAT_SAMSUNG
18 select PM_GENERIC_DOMAINS if PM 17 select PM_GENERIC_DOMAINS if PM
19 select S3C_DEV_NAND 18 select S3C_DEV_NAND if ATAGS
20 select S3C_GPIO_TRACK 19 select S3C_GPIO_TRACK if ATAGS
21 select SAMSUNG_ATAGS 20 select SAMSUNG_ATAGS if ATAGS
22 select SAMSUNG_WAKEMASK if PM 21 select SAMSUNG_WAKEMASK if PM
23 select SAMSUNG_WDT_RESET 22 select SAMSUNG_WDT_RESET
24 help 23 help
@@ -111,6 +110,7 @@ config S3C64XX_SETUP_USB_PHY
111 110
112config MACH_SMDK6400 111config MACH_SMDK6400
113 bool "SMDK6400" 112 bool "SMDK6400"
113 depends on ATAGS
114 select CPU_S3C6400 114 select CPU_S3C6400
115 select S3C64XX_SETUP_SDHCI 115 select S3C64XX_SETUP_SDHCI
116 select S3C_DEV_HSMMC1 116 select S3C_DEV_HSMMC1
@@ -121,6 +121,7 @@ config MACH_SMDK6400
121 121
122config MACH_ANW6410 122config MACH_ANW6410
123 bool "A&W6410" 123 bool "A&W6410"
124 depends on ATAGS
124 select CPU_S3C6410 125 select CPU_S3C6410
125 select S3C64XX_SETUP_FB_24BPP 126 select S3C64XX_SETUP_FB_24BPP
126 select S3C_DEV_FB 127 select S3C_DEV_FB
@@ -129,6 +130,7 @@ config MACH_ANW6410
129 130
130config MACH_MINI6410 131config MACH_MINI6410
131 bool "MINI6410" 132 bool "MINI6410"
133 depends on ATAGS
132 select CPU_S3C6410 134 select CPU_S3C6410
133 select S3C64XX_SETUP_FB_24BPP 135 select S3C64XX_SETUP_FB_24BPP
134 select S3C64XX_SETUP_SDHCI 136 select S3C64XX_SETUP_SDHCI
@@ -144,6 +146,7 @@ config MACH_MINI6410
144 146
145config MACH_REAL6410 147config MACH_REAL6410
146 bool "REAL6410" 148 bool "REAL6410"
149 depends on ATAGS
147 select CPU_S3C6410 150 select CPU_S3C6410
148 select S3C64XX_SETUP_FB_24BPP 151 select S3C64XX_SETUP_FB_24BPP
149 select S3C64XX_SETUP_SDHCI 152 select S3C64XX_SETUP_SDHCI
@@ -159,6 +162,7 @@ config MACH_REAL6410
159 162
160config MACH_SMDK6410 163config MACH_SMDK6410
161 bool "SMDK6410" 164 bool "SMDK6410"
165 depends on ATAGS
162 select CPU_S3C6410 166 select CPU_S3C6410
163 select HAVE_S3C2410_WATCHDOG if WATCHDOG 167 select HAVE_S3C2410_WATCHDOG if WATCHDOG
164 select S3C64XX_SETUP_FB_24BPP 168 select S3C64XX_SETUP_FB_24BPP
@@ -246,6 +250,7 @@ config SMDK6410_WM1192_EV1
246 250
247config MACH_NCP 251config MACH_NCP
248 bool "NCP" 252 bool "NCP"
253 depends on ATAGS
249 select CPU_S3C6410 254 select CPU_S3C6410
250 select S3C64XX_SETUP_I2C1 255 select S3C64XX_SETUP_I2C1
251 select S3C_DEV_HSMMC1 256 select S3C_DEV_HSMMC1
@@ -255,6 +260,7 @@ config MACH_NCP
255 260
256config MACH_HMT 261config MACH_HMT
257 bool "Airgoo HMT" 262 bool "Airgoo HMT"
263 depends on ATAGS
258 select CPU_S3C6410 264 select CPU_S3C6410
259 select S3C64XX_SETUP_FB_24BPP 265 select S3C64XX_SETUP_FB_24BPP
260 select S3C_DEV_FB 266 select S3C_DEV_FB
@@ -286,18 +292,21 @@ config MACH_SMARTQ
286 292
287config MACH_SMARTQ5 293config MACH_SMARTQ5
288 bool "SmartQ 5" 294 bool "SmartQ 5"
295 depends on ATAGS
289 select MACH_SMARTQ 296 select MACH_SMARTQ
290 help 297 help
291 Machine support for the SmartQ 5 298 Machine support for the SmartQ 5
292 299
293config MACH_SMARTQ7 300config MACH_SMARTQ7
294 bool "SmartQ 7" 301 bool "SmartQ 7"
302 depends on ATAGS
295 select MACH_SMARTQ 303 select MACH_SMARTQ
296 help 304 help
297 Machine support for the SmartQ 7 305 Machine support for the SmartQ 7
298 306
299config MACH_WLF_CRAGG_6410 307config MACH_WLF_CRAGG_6410
300 bool "Wolfson Cragganmore 6410" 308 bool "Wolfson Cragganmore 6410"
309 depends on ATAGS
301 depends on I2C=y 310 depends on I2C=y
302 select CPU_S3C6410 311 select CPU_S3C6410
303 select LEDS_GPIO_REGISTER 312 select LEDS_GPIO_REGISTER
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index 04cdcd40e23c..256cd5b40c60 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -8,20 +8,21 @@
8ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include 8ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
9asflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include 9asflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
10 10
11# Core 11# PM
12 12
13obj-y += common.o 13obj-$(CONFIG_PM) += pm.o
14obj-$(CONFIG_PM_SLEEP) += sleep.o
15obj-$(CONFIG_CPU_IDLE) += cpuidle.o
14 16
15# Core support 17ifdef CONFIG_SAMSUNG_ATAGS
16 18
17obj-$(CONFIG_CPU_S3C6400) += s3c6400.o 19obj-$(CONFIG_PM_SLEEP) += irq-pm.o
18obj-$(CONFIG_CPU_S3C6410) += s3c6410.o
19 20
20# PM 21# Core
21 22
22obj-$(CONFIG_PM) += pm.o 23obj-y += common.o
23obj-$(CONFIG_PM_SLEEP) += irq-pm.o sleep.o 24obj-$(CONFIG_CPU_S3C6400) += s3c6400.o
24obj-$(CONFIG_CPU_IDLE) += cpuidle.o 25obj-$(CONFIG_CPU_S3C6410) += s3c6410.o
25 26
26# DMA support 27# DMA support
27 28
@@ -58,4 +59,6 @@ obj-$(CONFIG_MACH_SMARTQ7) += mach-smartq7.o
58obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o 59obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o
59obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o 60obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o
60obj-$(CONFIG_MACH_WLF_CRAGG_6410) += mach-crag6410.o mach-crag6410-module.o 61obj-$(CONFIG_MACH_WLF_CRAGG_6410) += mach-crag6410.o mach-crag6410-module.o
62endif
63
61obj-$(CONFIG_MACH_S3C64XX_DT) += mach-s3c64xx-dt.o 64obj-$(CONFIG_MACH_S3C64XX_DT) += mach-s3c64xx-dt.o
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-samsung.h b/arch/arm/mach-s3c64xx/include/mach/gpio-samsung.h
index 9c81fac3b2d5..1d3636512e33 100644
--- a/arch/arm/mach-s3c64xx/include/mach/gpio-samsung.h
+++ b/arch/arm/mach-s3c64xx/include/mach/gpio-samsung.h
@@ -14,6 +14,8 @@
14#ifndef GPIO_SAMSUNG_S3C64XX_H 14#ifndef GPIO_SAMSUNG_S3C64XX_H
15#define GPIO_SAMSUNG_S3C64XX_H 15#define GPIO_SAMSUNG_S3C64XX_H
16 16
17#ifdef CONFIG_GPIO_SAMSUNG
18
17/* GPIO bank sizes */ 19/* GPIO bank sizes */
18#define S3C64XX_GPIO_A_NR (8) 20#define S3C64XX_GPIO_A_NR (8)
19#define S3C64XX_GPIO_B_NR (7) 21#define S3C64XX_GPIO_B_NR (7)
@@ -90,5 +92,6 @@ enum s3c_gpio_number {
90/* define the number of gpios we need to the one after the GPQ() range */ 92/* define the number of gpios we need to the one after the GPQ() range */
91#define GPIO_BOARD_START (S3C64XX_GPQ(S3C64XX_GPIO_Q_NR) + 1) 93#define GPIO_BOARD_START (S3C64XX_GPQ(S3C64XX_GPIO_Q_NR) + 1)
92 94
95#endif /* GPIO_SAMSUNG */
93#endif /* GPIO_SAMSUNG_S3C64XX_H */ 96#endif /* GPIO_SAMSUNG_S3C64XX_H */
94 97
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index 82777c649774..d7803b434732 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -23,14 +23,10 @@
23#include <asm/cacheflush.h> 23#include <asm/cacheflush.h>
24#include <asm/suspend.h> 24#include <asm/suspend.h>
25 25
26#ifdef CONFIG_SAMSUNG_ATAGS
27#include <mach/map.h> 26#include <mach/map.h>
28#ifndef CONFIG_ARCH_EXYNOS
29#include <mach/regs-clock.h> 27#include <mach/regs-clock.h>
30#include <mach/regs-irq.h> 28#include <mach/regs-irq.h>
31#endif
32#include <mach/irqs.h> 29#include <mach/irqs.h>
33#endif
34 30
35#include <asm/irq.h> 31#include <asm/irq.h>
36 32