From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 10/10] ARM: s3c64xx: allow building without board support
Date: Mon, 2 Mar 2015 13:36:03 +0100 [thread overview]
Message-ID: <1425299763-4066822-11-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1425299763-4066822-1-git-send-email-arnd@arndb.de>
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>
---
arch/arm/mach-s3c64xx/Kconfig | 19 ++++++++++++++-----
arch/arm/mach-s3c64xx/Makefile | 20 ++++++++++++--------
arch/arm/mach-s3c64xx/include/mach/gpio-samsung.h | 3 +++
arch/arm/plat-samsung/pm.c | 4 ----
4 files changed, 29 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 8bdddee61520..48d1fbbdef13 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -7,18 +7,17 @@ menuconfig ARCH_S3C64XX
select ARCH_REQUIRE_GPIOLIB
select ARM_AMBA
select ARM_VIC
- select ATAGS
select CLKSRC_SAMSUNG_PWM
select COMMON_CLK_SAMSUNG
- select GPIO_SAMSUNG
+ select GPIO_SAMSUNG if ATAGS
select HAVE_S3C2410_I2C if I2C
select HAVE_S3C2410_WATCHDOG if WATCHDOG
select HAVE_TCM
select PLAT_SAMSUNG
select PM_GENERIC_DOMAINS if PM
- select S3C_DEV_NAND
- select S3C_GPIO_TRACK
- select SAMSUNG_ATAGS
+ select S3C_DEV_NAND if ATAGS
+ select S3C_GPIO_TRACK if ATAGS
+ select SAMSUNG_ATAGS if ATAGS
select SAMSUNG_WAKEMASK if PM
select SAMSUNG_WDT_RESET
help
@@ -105,6 +104,7 @@ config S3C64XX_SETUP_USB_PHY
config MACH_SMDK6400
bool "SMDK6400"
+ depends on ATAGS
select CPU_S3C6400
select S3C64XX_SETUP_SDHCI
select S3C_DEV_HSMMC1
@@ -115,6 +115,7 @@ config MACH_SMDK6400
config MACH_ANW6410
bool "A&W6410"
+ depends on ATAGS
select CPU_S3C6410
select S3C64XX_SETUP_FB_24BPP
select S3C_DEV_FB
@@ -123,6 +124,7 @@ config MACH_ANW6410
config MACH_MINI6410
bool "MINI6410"
+ depends on ATAGS
select CPU_S3C6410
select S3C64XX_SETUP_FB_24BPP
select S3C64XX_SETUP_SDHCI
@@ -138,6 +140,7 @@ config MACH_MINI6410
config MACH_REAL6410
bool "REAL6410"
+ depends on ATAGS
select CPU_S3C6410
select S3C64XX_SETUP_FB_24BPP
select S3C64XX_SETUP_SDHCI
@@ -153,6 +156,7 @@ config MACH_REAL6410
config MACH_SMDK6410
bool "SMDK6410"
+ depends on ATAGS
select CPU_S3C6410
select HAVE_S3C2410_WATCHDOG if WATCHDOG
select S3C64XX_SETUP_FB_24BPP
@@ -238,6 +242,7 @@ config SMDK6410_WM1192_EV1
config MACH_NCP
bool "NCP"
+ depends on ATAGS
select CPU_S3C6410
select S3C64XX_SETUP_I2C1
select S3C_DEV_HSMMC1
@@ -247,6 +252,7 @@ config MACH_NCP
config MACH_HMT
bool "Airgoo HMT"
+ depends on ATAGS
select CPU_S3C6410
select S3C64XX_SETUP_FB_24BPP
select S3C_DEV_FB
@@ -278,18 +284,21 @@ config MACH_SMARTQ
config MACH_SMARTQ5
bool "SmartQ 5"
+ depends on ATAGS
select MACH_SMARTQ
help
Machine support for the SmartQ 5
config MACH_SMARTQ7
bool "SmartQ 7"
+ depends on ATAGS
select MACH_SMARTQ
help
Machine support for the SmartQ 7
config MACH_WLF_CRAGG_6410
bool "Wolfson Cragganmore 6410"
+ depends on ATAGS
select CPU_S3C6410
select I2C
select LEDS_GPIO_REGISTER
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index 46dcdf1584d6..9f242dac9d6d 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -8,19 +8,21 @@
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
asflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
-# Core
+# PM
-obj-y += common.o
+obj-$(CONFIG_PM) += pm.o
+obj-$(CONFIG_PM_SLEEP) += sleep.o
+obj-$(CONFIG_CPU_IDLE) += cpuidle.o
-# Core support
+ifdef CONFIG_SAMSUNG_ATAGS
-obj-$(CONFIG_CPU_S3C6400) += s3c6400.o
-obj-$(CONFIG_CPU_S3C6410) += s3c6410.o
+obj-$(CONFIG_PM_SLEEP) += irq-pm.o
-# PM
+# Core
-obj-$(CONFIG_PM) += pm.o irq-pm.o sleep.o
-obj-$(CONFIG_CPU_IDLE) += cpuidle.o
+obj-y += common.o
+obj-$(CONFIG_CPU_S3C6400) += s3c6400.o
+obj-$(CONFIG_CPU_S3C6410) += s3c6410.o
# DMA support
@@ -55,4 +57,6 @@ obj-$(CONFIG_MACH_SMARTQ7) += mach-smartq7.o
obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o
obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o
obj-$(CONFIG_MACH_WLF_CRAGG_6410) += mach-crag6410.o mach-crag6410-module.o
+endif
+
obj-$(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 @@
#ifndef GPIO_SAMSUNG_S3C64XX_H
#define GPIO_SAMSUNG_S3C64XX_H
+#ifdef CONFIG_GPIO_SAMSUNG
+
/* GPIO bank sizes */
#define S3C64XX_GPIO_A_NR (8)
#define S3C64XX_GPIO_B_NR (7)
@@ -90,5 +92,6 @@ enum s3c_gpio_number {
/* define the number of gpios we need to the one after the GPQ() range */
#define GPIO_BOARD_START (S3C64XX_GPQ(S3C64XX_GPIO_Q_NR) + 1)
+#endif /* GPIO_SAMSUNG */
#endif /* GPIO_SAMSUNG_S3C64XX_H */
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index f8c0f9797dcf..a6193771bbea 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -23,14 +23,10 @@
#include <asm/cacheflush.h>
#include <asm/suspend.h>
-#ifdef CONFIG_SAMSUNG_ATAGS
#include <mach/map.h>
-#ifndef CONFIG_ARCH_EXYNOS
#include <mach/regs-clock.h>
#include <mach/regs-irq.h>
-#endif
#include <mach/irqs.h>
-#endif
#include <asm/irq.h>
--
2.1.0.rc2
next prev parent reply other threads:[~2015-03-02 12:36 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 12:35 [PATCH 00/10] ARM: s3c64xx multiplatform, help needed Arnd Bergmann
2015-03-02 12:35 ` [PATCH 01/10] Input: s3c2410_ts: fix S3C_ADC dependency Arnd Bergmann
2015-03-04 23:05 ` Dmitry Torokhov
2015-03-02 12:35 ` [PATCH 02/10] ASoC: samsung/smartq: use dynamic registration Arnd Bergmann
2015-03-03 14:14 ` Mark Brown
2015-03-02 12:35 ` [PATCH 03/10] gpio: samsung: move gpio-samsung driver back to platform code Arnd Bergmann
2015-03-02 12:35 ` [PATCH 04/10] ARM: s3c64xx: prepare initcalls for multiplatform Arnd Bergmann
2015-03-02 12:35 ` [PATCH 05/10] ARM: s3c64xx: enable sparse IRQ support Arnd Bergmann
2015-03-06 17:43 ` Charles Keepax
2015-03-08 18:56 ` Mark Brown
2015-03-08 21:42 ` Arnd Bergmann
2015-03-18 0:02 ` Mark Brown
2015-03-21 16:38 ` Charles Keepax
2015-03-21 18:22 ` Mark Brown
2015-03-22 2:54 ` Arnd Bergmann
2015-03-02 12:35 ` [PATCH 06/10] iio: exynos-adc: add experimental touchscreen support Arnd Bergmann
2015-03-04 23:10 ` Dmitry Torokhov
2015-03-12 17:01 ` Arnd Bergmann
2015-03-02 12:36 ` [PATCH 07/10] ARM: s3c64xx: use new adc/touchscreen driver Arnd Bergmann
2015-03-02 12:36 ` [PATCH 08/10] ARM: s3c64xx: use common debug-ll implementation Arnd Bergmann
2015-03-02 12:36 ` [PATCH 09/10] ARM: s3c64xx: multiplatform support Arnd Bergmann
2015-03-02 12:36 ` Arnd Bergmann [this message]
2015-03-21 17:17 ` [PATCH 10/10] ARM: s3c64xx: allow building without board support Charles Keepax
2015-03-02 16:17 ` [PATCH 00/10] ARM: s3c64xx multiplatform, help needed Mark Brown
2015-03-02 18:03 ` Charles Keepax
2015-03-02 16:53 ` Tomasz Figa
2015-03-02 19:04 ` Kukjin Kim
2015-03-02 17:37 ` Dmitry Torokhov
2015-03-02 18:14 ` Vasily Khoruzhick
2015-03-02 20:48 ` Arnd Bergmann
2015-11-25 16:06 [PATCH 00/10] ARM: s3c64xx multiplatform Arnd Bergmann
2015-11-25 16:06 ` [PATCH 10/10] ARM: s3c64xx: allow building without board support Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1425299763-4066822-11-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).