From f8b1ac01458a39454d04172df4c070134902f837 Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Sat, 15 Jun 2013 09:01:11 +0900 Subject: ARM: EXYNOS: Make ARCH_EXYNOS select USE_OF Since EXYNOS is now DT-only, it always requires USE_OF option to be selected. This patch moves USE_OF selection from entries of DT board files to ARCH_EXYNOS. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park Acked-by: Arnd Bergmann Signed-off-by: Kukjin Kim --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 49d993cee512..fc20cfc471d0 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -796,6 +796,7 @@ config ARCH_EXYNOS select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_GPIO_H select NEED_MACH_MEMORY_H + select USE_OF help Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) -- cgit v1.2.3 From cd8dc7ae41f2b2e6392e32c8471589a8ca5fa705 Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Sat, 15 Jun 2013 09:01:49 +0900 Subject: ARM: SAMSUNG: Introduce SAMSUNG_ATAGS Kconfig entry This patch adds a Kconfig entry that enables compilation of legacy support code required for Samsung platforms that require ATAGS based boot. This allows to bypass compilation of this code when platforms without ATAGS support are selected. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park Acked-by: Arnd Bergmann Signed-off-by: Kukjin Kim --- arch/arm/Kconfig | 6 ++++++ arch/arm/plat-samsung/Kconfig | 26 +++++++++++++++++++++----- arch/arm/plat-samsung/Makefile | 6 +++--- 3 files changed, 30 insertions(+), 8 deletions(-) (limited to 'arch/arm/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index fc20cfc471d0..aa8dcfc27903 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -702,6 +702,7 @@ config ARCH_S3C24XX select MULTI_IRQ_HANDLER select NEED_MACH_GPIO_H select NEED_MACH_IO_H + select SAMSUNG_ATAGS help Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443 and S3C2450 SoCs based systems, such as the Simtec Electronics BAST @@ -726,6 +727,7 @@ config ARCH_S3C64XX select PLAT_SAMSUNG select S3C_DEV_NAND select S3C_GPIO_TRACK + select SAMSUNG_ATAGS select SAMSUNG_CLKSRC select SAMSUNG_GPIOLIB_4BIT select SAMSUNG_IRQ_VIC_TIMER @@ -744,6 +746,7 @@ config ARCH_S5P64X0 select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_GPIO_H + select SAMSUNG_ATAGS help Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440, SMDK6450. @@ -760,6 +763,7 @@ config ARCH_S5PC100 select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_GPIO_H + select SAMSUNG_ATAGS help Samsung S5PC100 series based systems @@ -778,6 +782,7 @@ config ARCH_S5PV210 select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_GPIO_H select NEED_MACH_MEMORY_H + select SAMSUNG_ATAGS help Samsung S5PV210/S5PC110 series based systems @@ -796,6 +801,7 @@ config ARCH_EXYNOS select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_GPIO_H select NEED_MACH_MEMORY_H + select SAMSUNG_ATAGS select USE_OF help Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index f8ed2de0a678..c0f0542e6dfc 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig @@ -60,6 +60,20 @@ config S3C_LOWLEVEL_UART_PORT this configuration should be between zero and two. The port must have been initialised by the boot-loader before use. +config SAMSUNG_ATAGS + def_bool n + depends on !ARCH_MULTIPLATFORM + depends on ATAGS + help + This option enables ATAGS based boot support code for + Samsung platforms, including static platform devices, legacy + clock, timer and interrupt initialization, etc. + + Platforms that support only DT based boot need not to select + this option. + +if SAMSUNG_ATAGS + # timer options config SAMSUNG_HRT @@ -367,11 +381,6 @@ config S5P_DEV_JPEG help Compile in platform device definitions for JPEG codec -config S5P_DEV_MFC - bool - help - Compile in setup memory (init) code for MFC - config S5P_DEV_ONENAND bool help @@ -412,6 +421,8 @@ config S3C_DMA help Internal configuration for S3C DMA core +endif + config SAMSUNG_DMADEV bool select ARM_AMBA @@ -421,6 +432,11 @@ config SAMSUNG_DMADEV help Use DMA device engine for PL330 DMAC. +config S5P_DEV_MFC + bool + help + Compile in setup memory (init) code for MFC + comment "Power management" config SAMSUNG_PM_DEBUG diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index a23c460299a1..b549ea9cfe09 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile @@ -31,10 +31,10 @@ obj-$(CONFIG_S3C_ADC) += adc.o # devices -obj-y += platformdata.o +obj-$(CONFIG_SAMSUNG_ATAGS) += platformdata.o -obj-y += devs.o -obj-y += dev-uart.o +obj-$(CONFIG_SAMSUNG_ATAGS) += devs.o +obj-$(CONFIG_SAMSUNG_ATAGS) += dev-uart.o obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o -- cgit v1.2.3 From 880cf0717f70678b2ecd6bb762e469c64c3b0d83 Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Wed, 19 Jun 2013 01:22:20 +0900 Subject: ARM: SAMSUNG: Introduce GPIO_SAMSUNG Kconfig entry This patch adds Kconfig entry that selects whether legacy Samsung GPIO driver should be built or not. For platforms that support only DT based boot, the new pinctrl driver is used and so the old one is not needed. Cc: Grant Likely Cc: Linus Walleij Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park Signed-off-by: Kukjin Kim --- arch/arm/Kconfig | 6 ++++++ arch/arm/plat-samsung/include/plat/pm.h | 5 +++++ drivers/gpio/Kconfig | 7 +++++++ drivers/gpio/Makefile | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) (limited to 'arch/arm/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index aa8dcfc27903..15e599437e96 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -695,6 +695,7 @@ config ARCH_S3C24XX select CLKDEV_LOOKUP select CLKSRC_MMIO select GENERIC_CLOCKEVENTS + select GPIO_SAMSUNG select HAVE_CLK select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG @@ -718,6 +719,7 @@ config ARCH_S3C64XX select CLKSRC_MMIO select CPU_V6 select GENERIC_CLOCKEVENTS + select GPIO_SAMSUNG select HAVE_CLK select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG @@ -741,6 +743,7 @@ config ARCH_S5P64X0 select CLKSRC_MMIO select CPU_V6 select GENERIC_CLOCKEVENTS + select GPIO_SAMSUNG select HAVE_CLK select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG @@ -758,6 +761,7 @@ config ARCH_S5PC100 select CLKSRC_MMIO select CPU_V7 select GENERIC_CLOCKEVENTS + select GPIO_SAMSUNG select HAVE_CLK select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG @@ -776,6 +780,7 @@ config ARCH_S5PV210 select CLKSRC_MMIO select CPU_V7 select GENERIC_CLOCKEVENTS + select GPIO_SAMSUNG select HAVE_CLK select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG @@ -795,6 +800,7 @@ config ARCH_EXYNOS select COMMON_CLK select CPU_V7 select GENERIC_CLOCKEVENTS + select GPIO_SAMSUNG select HAVE_CLK select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h index f6fcadeee969..5d47ca35cabd 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); */ extern void s3c_pm_configure_extint(void); +#ifdef CONFIG_GPIO_SAMSUNG /** * samsung_pm_restore_gpios() - restore the state of the gpios after sleep. * @@ -181,6 +182,10 @@ extern void samsung_pm_restore_gpios(void); * Save the GPIO states for resotration on resume. See samsung_pm_restore_gpios(). */ extern void samsung_pm_save_gpios(void); +#else +static inline void samsung_pm_restore_gpios(void) {} +static inline void samsung_pm_save_gpios(void) {} +#endif extern void s3c_pm_save_core(void); extern void s3c_pm_restore_core(void); diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 573c449c49b9..9c993ed491f1 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -209,6 +209,13 @@ config GPIO_RCAR help Say yes here to support GPIO on Renesas R-Car SoCs. +config GPIO_SAMSUNG + bool + depends on PLAT_SAMSUNG + help + Legacy GPIO support. Use only for platforms without support for + pinctrl. + config GPIO_SPEAR_SPICS bool "ST SPEAr13xx SPI Chip Select as GPIO support" depends on PLAT_SPEAR diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 0cb2d656ad16..ef3e983a2f1e 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -59,7 +59,7 @@ obj-$(CONFIG_GPIO_PXA) += gpio-pxa.o obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t583.o obj-$(CONFIG_GPIO_RDC321X) += gpio-rdc321x.o obj-$(CONFIG_GPIO_RCAR) += gpio-rcar.o -obj-$(CONFIG_PLAT_SAMSUNG) += gpio-samsung.o +obj-$(CONFIG_GPIO_SAMSUNG) += gpio-samsung.o obj-$(CONFIG_ARCH_SA1100) += gpio-sa1100.o obj-$(CONFIG_GPIO_SCH) += gpio-sch.o obj-$(CONFIG_GPIO_SODAVILLE) += gpio-sodaville.o -- cgit v1.2.3 From e245f9699e941fcc01af200806e8307e4ab7198d Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Wed, 19 Jun 2013 01:26:42 +0900 Subject: ARM: EXYNOS: Decouple ARCH_EXYNOS from PLAT_S5P After removing support for ATAGS based boot on Exynos, there is not much that can be shared between Exynos and other S5P platforms. This patch makes Exynos a standalone Samsung platform, not using PLAT_S5P. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park Signed-off-by: Kukjin Kim --- arch/arm/Kconfig | 3 +++ arch/arm/Makefile | 1 + arch/arm/mach-exynos/Kconfig | 1 + arch/arm/plat-samsung/Kconfig | 8 +++----- arch/arm/plat-samsung/pm-gpio.c | 5 +++-- 5 files changed, 11 insertions(+), 7 deletions(-) (limited to 'arch/arm/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 15e599437e96..a4e32fd9bb4a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -795,7 +795,9 @@ config ARCH_EXYNOS bool "Samsung EXYNOS" select ARCH_HAS_CPUFREQ select ARCH_HAS_HOLES_MEMORYMODEL + select ARCH_REQUIRE_GPIOLIB select ARCH_SPARSEMEM_ENABLE + select ARM_GIC select CLKDEV_LOOKUP select COMMON_CLK select CPU_V7 @@ -807,6 +809,7 @@ config ARCH_EXYNOS select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_GPIO_H select NEED_MACH_MEMORY_H + select S5P_GPIO_DRVSTR select SAMSUNG_ATAGS select USE_OF help diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 1ba358ba16b8..60133fb4d6c3 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -197,6 +197,7 @@ machine-$(CONFIG_ARCH_SUNXI) += sunxi # Platform directory name. This list is sorted alphanumerically # by CONFIG_* macro name. +plat-$(CONFIG_ARCH_EXYNOS) += samsung plat-$(CONFIG_ARCH_OMAP) += omap plat-$(CONFIG_ARCH_S3C64XX) += samsung plat-$(CONFIG_PLAT_IOP) += iop diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 2bc2696153f9..1f356790a4f4 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -14,6 +14,7 @@ menu "SAMSUNG EXYNOS SoCs Support" config ARCH_EXYNOS4 bool "SAMSUNG EXYNOS4" default y + select GIC_NON_BANKED select HAVE_ARM_SCU if SMP select HAVE_SMP select MIGHT_HAVE_CACHE_L2X0 diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 7b08b2678b1a..ca27cc9ac4bf 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig @@ -6,7 +6,7 @@ config PLAT_SAMSUNG bool - depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P + depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P || ARCH_EXYNOS default y select GENERIC_IRQ_CHIP select NO_IOPORT @@ -15,12 +15,10 @@ config PLAT_SAMSUNG config PLAT_S5P bool - depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS) + depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210) default y select ARCH_REQUIRE_GPIOLIB - select ARM_GIC if ARCH_EXYNOS - select ARM_VIC if !ARCH_EXYNOS - select GIC_NON_BANKED if ARCH_EXYNOS4 + select ARM_VIC select NO_IOPORT select PLAT_SAMSUNG select S3C_GPIO_TRACK diff --git a/arch/arm/plat-samsung/pm-gpio.c b/arch/arm/plat-samsung/pm-gpio.c index c2ff92c30bdf..a8de3cfe2ee1 100644 --- a/arch/arm/plat-samsung/pm-gpio.c +++ b/arch/arm/plat-samsung/pm-gpio.c @@ -192,7 +192,8 @@ struct samsung_gpio_pm samsung_gpio_pm_2bit = { .resume = samsung_gpio_pm_2bit_resume, }; -#if defined(CONFIG_ARCH_S3C64XX) || defined(CONFIG_PLAT_S5P) +#if defined(CONFIG_ARCH_S3C64XX) || defined(CONFIG_PLAT_S5P) \ + || defined(CONFIG_ARCH_EXYNOS) static void samsung_gpio_pm_4bit_save(struct samsung_gpio_chip *chip) { chip->pm_save[1] = __raw_readl(chip->base + OFFS_CON); @@ -302,7 +303,7 @@ struct samsung_gpio_pm samsung_gpio_pm_4bit = { .save = samsung_gpio_pm_4bit_save, .resume = samsung_gpio_pm_4bit_resume, }; -#endif /* CONFIG_ARCH_S3C64XX || CONFIG_PLAT_S5P */ +#endif /* CONFIG_ARCH_S3C64XX || CONFIG_PLAT_S5P || CONFIG_ARCH_EXYNOS */ /** * samsung_pm_save_gpio() - save gpio chip data for suspend -- cgit v1.2.3 From 17859bec3557beb7f5b268e4fa35457e75071469 Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Wed, 19 Jun 2013 01:27:37 +0900 Subject: ARM: EXYNOS: Do not select legacy Kconfig symbols any more This patch removes selection of several legacy Kconfig symbols from ARCH_EXYNOS to bypass compilation of code used only for ATAGS based boot. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park Signed-off-by: Kukjin Kim --- arch/arm/Kconfig | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/arm/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a4e32fd9bb4a..17a2d6a65728 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -802,15 +802,11 @@ config ARCH_EXYNOS select COMMON_CLK select CPU_V7 select GENERIC_CLOCKEVENTS - select GPIO_SAMSUNG select HAVE_CLK select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS - select NEED_MACH_GPIO_H select NEED_MACH_MEMORY_H - select S5P_GPIO_DRVSTR - select SAMSUNG_ATAGS select USE_OF help Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) -- cgit v1.2.3 From 6e726ea4f50e7fea5844a2a0fee29d6d3d2e8bdf Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Sat, 15 Jun 2013 09:28:55 +0900 Subject: ARM: EXYNOS: Select SPARSE_IRQ for Exynos This patch adds selection of CONFIG_SPARSE_IRQ for ARCH_EXYNOS, since it is required by multiplatform and allows to remove the legacy mach/irqs.h header. To make this possible, a dummy IRQ_EINT_BIT macro is added to pm-core.h header to allow plat-samsung/pm.c compile. This macro is irrelevant for Exynos and will be removed after reworking Samsung pm code for multiplatform compatibility. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park Acked-by: Arnd Bergmann Signed-off-by: Kukjin Kim --- arch/arm/Kconfig | 1 + arch/arm/mach-exynos/include/mach/pm-core.h | 1 + 2 files changed, 2 insertions(+) (limited to 'arch/arm/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 17a2d6a65728..14f6e1138e88 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -807,6 +807,7 @@ config ARCH_EXYNOS select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C_RTC if RTC_CLASS select NEED_MACH_MEMORY_H + select SPARSE_IRQ select USE_OF help Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) diff --git a/arch/arm/mach-exynos/include/mach/pm-core.h b/arch/arm/mach-exynos/include/mach/pm-core.h index dd62559a2ed4..71e6b89719ab 100644 --- a/arch/arm/mach-exynos/include/mach/pm-core.h +++ b/arch/arm/mach-exynos/include/mach/pm-core.h @@ -70,6 +70,7 @@ static inline void samsung_pm_saved_gpios(void) } /* Compatibility definitions to make plat-samsung/pm.c compile */ +#define IRQ_EINT_BIT(x) 1 #define s3c_irqwake_intallow 0 #define s3c_irqwake_eintallow 0 -- cgit v1.2.3