aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-10 08:57:15 -0400
committerArnd Bergmann <arnd@arndb.de>2013-04-19 07:51:26 -0400
commitbd51de53e1be9896d815bbea30560262216d4616 (patch)
treebd9f221d20bcc28cd6f4bb80f869c3aa6b1e3721
parentb9d7c5d3f48fb9582458ce014baa66c1e16d9be6 (diff)
ARM: exynos: enable multiplatform support
This makes it possible to enable the exynos platform as part of a multiplatform kernel, in addition to keeping the single-platform exynos support. The multiplatform variant has a number of limitations at the moment: * It only supports DT-enabled machines. This is not a problem in the long run, as non-DT machines for exynos are going away. The main problem here is that the gpio code and the exynos_eint irqchip are not multiplatform capable but still required for ATAGS based boot. * The watchdog driver is still missing a conversion. * sparsemem and memory_holes are currently not supported in multiplatform. The the multiplatform aware ARCH_EXYNOS Kconfig symbol is disabled for now, as dependent patches are still pending in other subsystem trees. We will enable it once everything comes together. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--arch/arm/Kconfig9
-rw-r--r--arch/arm/configs/exynos4_defconfig2
-rw-r--r--arch/arm/mach-exynos/Kconfig25
-rw-r--r--arch/arm/mach-exynos/Makefile5
-rw-r--r--arch/arm/mach-exynos/common.c6
-rw-r--r--arch/arm/plat-samsung/Kconfig7
-rw-r--r--arch/arm/plat-samsung/Makefile8
-rw-r--r--arch/arm/plat-samsung/include/plat/pm.h5
-rw-r--r--drivers/gpio/Makefile2
9 files changed, 50 insertions, 19 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 13b739469c51..b375a94fe292 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -853,18 +853,11 @@ config ARCH_S5PV210
853 help 853 help
854 Samsung S5PV210/S5PC110 series based systems 854 Samsung S5PV210/S5PC110 series based systems
855 855
856config ARCH_EXYNOS 856config ARCH_EXYNOS_SINGLE
857 bool "Samsung EXYNOS" 857 bool "Samsung EXYNOS"
858 select ARCH_HAS_CPUFREQ
859 select ARCH_HAS_HOLES_MEMORYMODEL 858 select ARCH_HAS_HOLES_MEMORYMODEL
860 select ARCH_SPARSEMEM_ENABLE 859 select ARCH_SPARSEMEM_ENABLE
861 select CLKDEV_LOOKUP
862 select CPU_V7
863 select GENERIC_CLOCKEVENTS
864 select HAVE_CLK
865 select HAVE_S3C2410_I2C if I2C
866 select HAVE_S3C2410_WATCHDOG if WATCHDOG 860 select HAVE_S3C2410_WATCHDOG if WATCHDOG
867 select HAVE_S3C_RTC if RTC_CLASS
868 select NEED_MACH_GPIO_H 861 select NEED_MACH_GPIO_H
869 select NEED_MACH_MEMORY_H 862 select NEED_MACH_MEMORY_H
870 help 863 help
diff --git a/arch/arm/configs/exynos4_defconfig b/arch/arm/configs/exynos4_defconfig
index bffe68e190a3..ae90a0f7d53c 100644
--- a/arch/arm/configs/exynos4_defconfig
+++ b/arch/arm/configs/exynos4_defconfig
@@ -4,7 +4,7 @@ CONFIG_KALLSYMS_ALL=y
4CONFIG_MODULES=y 4CONFIG_MODULES=y
5CONFIG_MODULE_UNLOAD=y 5CONFIG_MODULE_UNLOAD=y
6# CONFIG_BLK_DEV_BSG is not set 6# CONFIG_BLK_DEV_BSG is not set
7CONFIG_ARCH_EXYNOS=y 7CONFIG_ARCH_EXYNOS_SINGLE=y
8CONFIG_S3C_LOWLEVEL_UART_PORT=1 8CONFIG_S3C_LOWLEVEL_UART_PORT=1
9CONFIG_MACH_SMDKC210=y 9CONFIG_MACH_SMDKC210=y
10CONFIG_MACH_ARMLEX4210=y 10CONFIG_MACH_ARMLEX4210=y
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index d8c251b13ab8..1d69c62fe3d8 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -7,6 +7,20 @@
7 7
8# Configuration options for the EXYNOS4 8# Configuration options for the EXYNOS4
9 9
10config ARCH_EXYNOS
11 # TODO: make this visible after all drivers are converted
12 bool "Samsung EXYNOS" if ARCH_MULTI_V7 && BROKEN
13 default ARCH_EXYNOS_SINGLE
14 select ARCH_HAS_CPUFREQ
15 select CLKDEV_LOOKUP
16 select CPU_V7
17 select GENERIC_CLOCKEVENTS
18 select HAVE_CLK
19 select HAVE_S3C2410_I2C if I2C
20 select HAVE_S3C_RTC if RTC_CLASS
21 help
22 Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
23
10if ARCH_EXYNOS 24if ARCH_EXYNOS
11 25
12menu "SAMSUNG EXYNOS SoCs Support" 26menu "SAMSUNG EXYNOS SoCs Support"
@@ -19,6 +33,9 @@ config ARCH_EXYNOS4
19 help 33 help
20 Samsung EXYNOS4 SoCs based systems 34 Samsung EXYNOS4 SoCs based systems
21 35
36config ARCH_EXYNOS4_SINGLE
37 def_bool ARCH_EXYNOS4 && ARCH_EXYNOS_SINGLE
38
22config ARCH_EXYNOS5 39config ARCH_EXYNOS5
23 bool "SAMSUNG EXYNOS5" 40 bool "SAMSUNG EXYNOS5"
24 select HAVE_SMP 41 select HAVE_SMP
@@ -35,7 +52,7 @@ config CPU_EXYNOS4210
35 select PM_GENERIC_DOMAINS 52 select PM_GENERIC_DOMAINS
36 select S5P_PM if PM 53 select S5P_PM if PM
37 select S5P_SLEEP if PM 54 select S5P_SLEEP if PM
38 select SAMSUNG_DMADEV 55 select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE
39 help 56 help
40 Enable EXYNOS4210 CPU support 57 Enable EXYNOS4210 CPU support
41 58
@@ -45,7 +62,7 @@ config SOC_EXYNOS4212
45 depends on ARCH_EXYNOS4 62 depends on ARCH_EXYNOS4
46 select S5P_PM if PM 63 select S5P_PM if PM
47 select S5P_SLEEP if PM 64 select S5P_SLEEP if PM
48 select SAMSUNG_DMADEV 65 select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE
49 help 66 help
50 Enable EXYNOS4212 SoC support 67 Enable EXYNOS4212 SoC support
51 68
@@ -53,7 +70,7 @@ config SOC_EXYNOS4412
53 bool "SAMSUNG EXYNOS4412" 70 bool "SAMSUNG EXYNOS4412"
54 default y 71 default y
55 depends on ARCH_EXYNOS4 72 depends on ARCH_EXYNOS4
56 select SAMSUNG_DMADEV 73 select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE
57 help 74 help
58 Enable EXYNOS4412 SoC support 75 Enable EXYNOS4412 SoC support
59 76
@@ -64,7 +81,7 @@ config SOC_EXYNOS5250
64 select S5P_PM if PM 81 select S5P_PM if PM
65 select S5P_SLEEP if PM 82 select S5P_SLEEP if PM
66 select S5P_DEV_MFC 83 select S5P_DEV_MFC
67 select SAMSUNG_DMADEV 84 select SAMSUNG_DMADEV if ARCH_EXYNOS_SINGLE
68 help 85 help
69 Enable EXYNOS5250 SoC support 86 Enable EXYNOS5250 SoC support
70 87
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 435757e57bb4..57e9124d95e0 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -4,6 +4,7 @@
4# http://www.samsung.com/ 4# http://www.samsung.com/
5# 5#
6# Licensed under GPLv2 6# Licensed under GPLv2
7ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
7 8
8obj-y := 9obj-y :=
9obj-m := 10obj-m :=
@@ -48,12 +49,12 @@ obj-$(CONFIG_MACH_EXYNOS5_DT) += mach-exynos5-dt.o
48# device support 49# device support
49 50
50obj-y += dev-uart.o 51obj-y += dev-uart.o
51obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o 52obj-$(CONFIG_ARCH_EXYNOS4_SINGLE) += dev-audio.o
52obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o 53obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o
53obj-$(CONFIG_EXYNOS_DEV_DMA) += dma.o 54obj-$(CONFIG_EXYNOS_DEV_DMA) += dma.o
54obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o 55obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o
55 56
56obj-$(CONFIG_ARCH_EXYNOS) += setup-i2c0.o 57obj-$(CONFIG_ARCH_EXYNOS_SINGLE) += setup-i2c0.o
57obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o 58obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o
58obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o 59obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o
59obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o 60obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index d63d399c7bae..83bd3f0e1519 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -368,6 +368,9 @@ static void __init exynos4_map_io(void)
368 else 368 else
369 iotable_init(exynos4_iodesc1, ARRAY_SIZE(exynos4_iodesc1)); 369 iotable_init(exynos4_iodesc1, ARRAY_SIZE(exynos4_iodesc1));
370 370
371 if (!IS_ENABLED(CONFIG_EXYNOS_ATAGS))
372 return
373
371 /* initialize device information early */ 374 /* initialize device information early */
372 exynos4_default_sdhci0(); 375 exynos4_default_sdhci0();
373 exynos4_default_sdhci1(); 376 exynos4_default_sdhci1();
@@ -570,6 +573,8 @@ static void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no)
570 s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no); 573 s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no);
571} 574}
572 575
576
577#ifdef CONFIG_EXYNOS_ATAGS
573static void __iomem *exynos_eint_base; 578static void __iomem *exynos_eint_base;
574 579
575static DEFINE_SPINLOCK(eint_lock); 580static DEFINE_SPINLOCK(eint_lock);
@@ -875,3 +880,4 @@ static int __init exynos_init_irq_eint(void)
875 return 0; 880 return 0;
876} 881}
877arch_initcall(exynos_init_irq_eint); 882arch_initcall(exynos_init_irq_eint);
883#endif
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index a9d52167e16e..8aae6816ebc2 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -13,6 +13,10 @@ config PLAT_SAMSUNG
13 help 13 help
14 Base platform code for all Samsung SoC based systems 14 Base platform code for all Samsung SoC based systems
15 15
16config PLAT_SAMSUNG_SINGLE
17 def_bool PLAT_SAMSUNG && !ARCH_MULTIPLATFORM
18
19
16config PLAT_S5P 20config PLAT_S5P
17 bool 21 bool
18 depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS) 22 depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS)
@@ -23,7 +27,7 @@ config PLAT_S5P
23 select GIC_NON_BANKED if ARCH_EXYNOS4 27 select GIC_NON_BANKED if ARCH_EXYNOS4
24 select NO_IOPORT 28 select NO_IOPORT
25 select PLAT_SAMSUNG 29 select PLAT_SAMSUNG
26 select S3C_GPIO_TRACK 30 select S3C_GPIO_TRACK if PLAT_SAMSUNG_SINGLE
27 select S5P_GPIO_DRVSTR 31 select S5P_GPIO_DRVSTR
28 select SAMSUNG_CLKSRC 32 select SAMSUNG_CLKSRC
29 select SAMSUNG_GPIOLIB_4BIT 33 select SAMSUNG_GPIOLIB_4BIT
@@ -178,6 +182,7 @@ config S5P_DEV_UART
178 182
179config S3C_ADC 183config S3C_ADC
180 bool "ADC common driver support" 184 bool "ADC common driver support"
185 depends on PLAT_SAMSUNG_SINGLE
181 help 186 help
182 Core support for the ADC block found in the Samsung SoC systems 187 Core support for the ADC block found in the Samsung SoC systems
183 for drivers such as the touchscreen and hwmon to use to share 188 for drivers such as the touchscreen and hwmon to use to share
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 3a7c64d1814a..cf684b2eb6fc 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -4,6 +4,9 @@
4# 4#
5# Licensed under GPLv2 5# Licensed under GPLv2
6 6
7ccflags-$(CONFIG_ARCH_MULTI_V7) += -I$(srctree)/$(src)/include
8ccflags-$(CONFIG_ARCH_EXYNOS) += -I$(srctree)/arch/arm/mach-exynos/include
9
7obj-y := 10obj-y :=
8obj-m := 11obj-m :=
9obj-n := dummy.o 12obj-n := dummy.o
@@ -34,7 +37,7 @@ obj-$(CONFIG_S3C_ADC) += adc.o
34 37
35obj-y += platformdata.o 38obj-y += platformdata.o
36 39
37obj-y += devs.o 40obj-$(CONFIG_PLAT_SAMSUNG_SINGLE) += devs.o
38obj-y += dev-uart.o 41obj-y += dev-uart.o
39obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o 42obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o
40obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o 43obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o
@@ -51,9 +54,10 @@ obj-$(CONFIG_S3C_DMA) += dma.o s3c-dma-ops.o
51obj-$(CONFIG_SAMSUNG_DMADEV) += dma-ops.o 54obj-$(CONFIG_SAMSUNG_DMADEV) += dma-ops.o
52 55
53# PM support 56# PM support
54
55obj-$(CONFIG_PM) += pm.o 57obj-$(CONFIG_PM) += pm.o
58ifdef CONFIG_PLAT_SAMSUNG_SINGLE
56obj-$(CONFIG_PM) += pm-gpio.o 59obj-$(CONFIG_PM) += pm-gpio.o
60endif
57obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o 61obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o
58 62
59obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o 63obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h
index f6fcadeee969..266a4e3e2458 100644
--- a/arch/arm/plat-samsung/include/plat/pm.h
+++ b/arch/arm/plat-samsung/include/plat/pm.h
@@ -166,6 +166,7 @@ extern void s3c_pm_check_store(void);
166 */ 166 */
167extern void s3c_pm_configure_extint(void); 167extern void s3c_pm_configure_extint(void);
168 168
169#ifdef CONFIG_PLAT_SAMSUNG_SINGLE
169/** 170/**
170 * samsung_pm_restore_gpios() - restore the state of the gpios after sleep. 171 * samsung_pm_restore_gpios() - restore the state of the gpios after sleep.
171 * 172 *
@@ -181,6 +182,10 @@ extern void samsung_pm_restore_gpios(void);
181 * Save the GPIO states for resotration on resume. See samsung_pm_restore_gpios(). 182 * Save the GPIO states for resotration on resume. See samsung_pm_restore_gpios().
182 */ 183 */
183extern void samsung_pm_save_gpios(void); 184extern void samsung_pm_save_gpios(void);
185#else
186#define samsung_pm_restore_gpios() do { } while(0)
187#define samsung_pm_save_gpios() do { } while(0)
188#endif
184 189
185extern void s3c_pm_save_core(void); 190extern void s3c_pm_save_core(void);
186extern void s3c_pm_restore_core(void); 191extern void s3c_pm_restore_core(void);
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 22e07bc9fcb5..6c16050d1577 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -57,7 +57,7 @@ obj-$(CONFIG_GPIO_PL061) += gpio-pl061.o
57obj-$(CONFIG_GPIO_PXA) += gpio-pxa.o 57obj-$(CONFIG_GPIO_PXA) += gpio-pxa.o
58obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t583.o 58obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t583.o
59obj-$(CONFIG_GPIO_RDC321X) += gpio-rdc321x.o 59obj-$(CONFIG_GPIO_RDC321X) += gpio-rdc321x.o
60obj-$(CONFIG_PLAT_SAMSUNG) += gpio-samsung.o 60obj-$(CONFIG_PLAT_SAMSUNG_SINGLE) += gpio-samsung.o
61obj-$(CONFIG_ARCH_SA1100) += gpio-sa1100.o 61obj-$(CONFIG_ARCH_SA1100) += gpio-sa1100.o
62obj-$(CONFIG_GPIO_SCH) += gpio-sch.o 62obj-$(CONFIG_GPIO_SCH) += gpio-sch.o
63obj-$(CONFIG_GPIO_SODAVILLE) += gpio-sodaville.o 63obj-$(CONFIG_GPIO_SODAVILLE) += gpio-sodaville.o