From a496bda66201e855f6b5d5d701d8bd65b9178700 Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Tue, 21 May 2013 01:01:41 +0900 Subject: ARM: S3C24XX: remove obsolete s3c2412 specific dma settings The s3c2412 dma init contained code to handle dma-direction specific settings. As now all s3c2412-dma-channels are direction-independent this is not needed anymore. As the s3c2412 also was the only user of this, it can go away completely. Signed-off-by: Heiko Stuebner Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/include/plat/dma-s3c24xx.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'arch/arm/plat-samsung') diff --git a/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h index d01576318b2c..bd3a6db14cbb 100644 --- a/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h +++ b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h @@ -28,7 +28,6 @@ struct s3c24xx_dma_map { const char *name; unsigned long channels[S3C_DMA_CHANNELS]; - unsigned long channels_rx[S3C_DMA_CHANNELS]; }; struct s3c24xx_dma_selection { @@ -38,10 +37,6 @@ struct s3c24xx_dma_selection { void (*select)(struct s3c2410_dma_chan *chan, struct s3c24xx_dma_map *map); - - void (*direction)(struct s3c2410_dma_chan *chan, - struct s3c24xx_dma_map *map, - enum dma_data_direction dir); }; extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); -- 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/plat-samsung/Kconfig | 26 +++++++++++++++++++++----- arch/arm/plat-samsung/Makefile | 6 +++--- 2 files changed, 24 insertions(+), 8 deletions(-) (limited to 'arch/arm/plat-samsung') 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 1f72e4045d42d8cfe81c9c7527429affeae7a2a2 Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Sat, 15 Jun 2013 09:03:49 +0900 Subject: ARM: EXYNOS: Remove legacy UART initialization code This patch removes legacy UART initialization code that was used to set up UART platform devices when booting with ATAGS, which is not supported on Exynos any more. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park Acked-by: Arnd Bergmann Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/init.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'arch/arm/plat-samsung') diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/plat-samsung/init.c index 79d10fca9090..3e5c4619caa5 100644 --- a/arch/arm/plat-samsung/init.c +++ b/arch/arm/plat-samsung/init.c @@ -87,7 +87,7 @@ void __init s3c24xx_init_clocks(int xtal) } /* uart management */ - +#if IS_ENABLED(CONFIG_SAMSUNG_ATAGS) static int nr_uarts __initdata = 0; static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS]; @@ -134,11 +134,12 @@ void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no) if (cpu == NULL) return; - if (cpu->init_uarts == NULL) { + if (cpu->init_uarts == NULL && IS_ENABLED(CONFIG_SAMSUNG_ATAGS)) { printk(KERN_ERR "s3c24xx_init_uarts: cpu has no uart init\n"); } else (cpu->init_uarts)(cfg, no); } +#endif static int __init s3c_arch_init(void) { @@ -152,8 +153,9 @@ static int __init s3c_arch_init(void) ret = (cpu->init)(); if (ret != 0) return ret; - +#if IS_ENABLED(CONFIG_SAMSUNG_ATAGS) ret = platform_add_devices(s3c24xx_uart_devs, nr_uarts); +#endif return ret; } -- 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/plat-samsung/include/plat/pm.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/plat-samsung') 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); -- cgit v1.2.3 From 105dddbfcc3ceb8bde60af1121a60ea9978fe714 Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Wed, 19 Jun 2013 01:24:12 +0900 Subject: ARM: SAMSUNG: Compile legacy IRQ and GPIO PM code only with ATAGS support This patch adds new Kconfig symbols, SAMSUNG_PM_GPIO and S5P_IRQ_PM that get enabled when GPIO_SAMSUNG, PM and S5P_PM are enabled, but only if SAMSUNG_ATAGS is selected. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/Kconfig | 13 +++++++++++++ arch/arm/plat-samsung/Makefile | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'arch/arm/plat-samsung') diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index c0f0542e6dfc..7b08b2678b1a 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig @@ -421,6 +421,19 @@ config S3C_DMA help Internal configuration for S3C DMA core +config S5P_IRQ_PM + bool + default y if S5P_PM + help + Legacy IRQ power management for S5P platforms + +config SAMSUNG_PM_GPIO + bool + default y if GPIO_SAMSUNG && PM + help + Include legacy GPIO power management code for platforms not using + pinctrl-samsung driver. + endif config SAMSUNG_DMADEV diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index b549ea9cfe09..6348ae2e3b46 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile @@ -52,10 +52,11 @@ obj-$(CONFIG_SAMSUNG_DMADEV) += dma-ops.o # PM support obj-$(CONFIG_PM) += pm.o -obj-$(CONFIG_PM) += pm-gpio.o +obj-$(CONFIG_SAMSUNG_PM_GPIO) += pm-gpio.o obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o -obj-$(CONFIG_S5P_PM) += s5p-pm.o s5p-irq-pm.o +obj-$(CONFIG_S5P_PM) += s5p-pm.o +obj-$(CONFIG_S5P_IRQ_PM) += s5p-irq-pm.o obj-$(CONFIG_S5P_SLEEP) += s5p-sleep.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/plat-samsung/Kconfig | 8 +++----- arch/arm/plat-samsung/pm-gpio.c | 5 +++-- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'arch/arm/plat-samsung') 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 d6280ffb44a3f9bf98efeb214fc46c6b551799f5 Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Sat, 15 Jun 2013 09:17:33 +0900 Subject: ARM: SAMSUNG: Include most of mach/ headers conditionally Since it is illegal to include mach/ headers from source files outside of respective mach-* directory and DT-only Samsung platforms might not have all of them anyway, this patches makes inclusion of them conditional, based on CONFIG_SAMSUNG_ATAGS. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park Acked-by: Arnd Bergmann Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/pm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'arch/arm/plat-samsung') diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index 53210ec4e8ec..d76ab723e1b7 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c @@ -21,13 +21,17 @@ #include #include -#include -#include #include + +#ifdef CONFIG_SAMSUNG_ATAGS +#include +#include #include #include #include +#endif + #include #include -- cgit v1.2.3 From 07fbe13debe71881581bafb552554a5ddf307cd0 Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Wed, 19 Jun 2013 01:28:56 +0900 Subject: ARM: SAMSUNG: Make legacy MFC support code depend on SAMSUNG_ATAGS This allows to bypass compilation of static platform device and resource definitions that require interrupts and base addresses to be defined statically. Cc: Jeongtae Park Cc: Kamil Debski Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/s5p-dev-mfc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'arch/arm/plat-samsung') diff --git a/arch/arm/plat-samsung/s5p-dev-mfc.c b/arch/arm/plat-samsung/s5p-dev-mfc.c index a93fb6fb6606..ad51f85fbd01 100644 --- a/arch/arm/plat-samsung/s5p-dev-mfc.c +++ b/arch/arm/plat-samsung/s5p-dev-mfc.c @@ -17,10 +17,12 @@ #include #include +#include + +#ifdef CONFIG_SAMSUNG_ATAGS #include #include #include -#include static struct resource s5p_mfc_resource[] = { [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K), @@ -61,6 +63,10 @@ struct platform_device s5p_device_mfc_r = { .coherent_dma_mask = DMA_BIT_MASK(32), }, }; +#else +static struct platform_device s5p_device_mfc_l; +static struct platform_device s5p_device_mfc_r; +#endif struct s5p_mfc_reserved_mem { phys_addr_t base; @@ -70,6 +76,7 @@ struct s5p_mfc_reserved_mem { static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initdata; + void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, phys_addr_t lbase, unsigned int lsize) { @@ -93,6 +100,7 @@ void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, } } +#ifdef CONFIG_SAMSUNG_ATAGS static int __init s5p_mfc_memory_init(void) { int i; @@ -111,6 +119,7 @@ static int __init s5p_mfc_memory_init(void) return 0; } device_initcall(s5p_mfc_memory_init); +#endif #ifdef CONFIG_OF int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname, -- cgit v1.2.3