aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 16:43:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 16:43:38 -0400
commit3883cbb6c1bda013a3ce2dbdab7dc97c52e4a232 (patch)
tree5b69f83b049d24ac81123ac954ca8c9128e48443 /arch/arm/plat-samsung
parentd2033f2c1d1de2239ded15e478ddb4028f192a15 (diff)
parent1eb92b24e243085d242cf5ffd64829bba70972e1 (diff)
Merge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC specific changes from Arnd Bergmann: "These changes are all to SoC-specific code, a total of 33 branches on 17 platforms were pulled into this. Like last time, Renesas sh-mobile is now the platform with the most changes, followed by OMAP and EXYNOS. Two new platforms, TI Keystone and Rockchips RK3xxx are added in this branch, both containing almost no platform specific code at all, since they are using generic subsystem interfaces for clocks, pinctrl, interrupts etc. The device drivers are getting merged through the respective subsystem maintainer trees. One more SoC (u300) is now multiplatform capable and several others (shmobile, exynos, msm, integrator, kirkwood, clps711x) are moving towards that goal with this series but need more work. Also noteworthy is the work on PCI here, which is traditionally part of the SoC specific code. With the changes done by Thomas Petazzoni, we can now more easily have PCI host controller drivers as loadable modules and keep them separate from the platform code in drivers/pci/host. This has already led to the discovery that three platforms (exynos, spear and imx) are actually using an identical PCIe host controller and will be able to share a driver once support for spear and imx is added." * tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (480 commits) ARM: integrator: let pciv3 use mem/premem from device tree ARM: integrator: set local side PCI addresses right ARM: dts: Add pcie controller node for exynos5440-ssdk5440 ARM: dts: Add pcie controller node for Samsung EXYNOS5440 SoC ARM: EXYNOS: Enable PCIe support for Exynos5440 pci: Add PCIe driver for Samsung Exynos ARM: OMAP5: voltagedomain data: remove temporary OMAP4 voltage data ARM: keystone: Move CPU bringup code to dedicated asm file ARM: multiplatform: always pick one CPU type ARM: imx: select syscon for IMX6SL ARM: keystone: select ARM_ERRATA_798181 only for SMP ARM: imx: Synertronixx scb9328 needs to select SOC_IMX1 ARM: OMAP2+: AM43x: resolve SMP related build error dmaengine: edma: enable build for AM33XX ARM: edma: Add EDMA crossbar event mux support ARM: edma: Add DT and runtime PM support to the private EDMA API dmaengine: edma: Add TI EDMA device tree binding arm: add basic support for Rockchip RK3066a boards arm: add debug uarts for rockchip rk29xx and rk3xxx series arm: Add basic clocks for Rockchip rk3066a SoCs ...
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/Kconfig47
-rw-r--r--arch/arm/plat-samsung/Makefile11
-rw-r--r--arch/arm/plat-samsung/include/plat/dma-s3c24xx.h5
-rw-r--r--arch/arm/plat-samsung/include/plat/pm.h5
-rw-r--r--arch/arm/plat-samsung/init.c8
-rw-r--r--arch/arm/plat-samsung/pm-gpio.c5
-rw-r--r--arch/arm/plat-samsung/pm.c8
-rw-r--r--arch/arm/plat-samsung/s5p-dev-mfc.c11
8 files changed, 72 insertions, 28 deletions
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index ec68155a8bf1..3dc5cbea86cc 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -6,7 +6,7 @@
6 6
7config PLAT_SAMSUNG 7config PLAT_SAMSUNG
8 bool 8 bool
9 depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P 9 depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P || ARCH_EXYNOS
10 default y 10 default y
11 select GENERIC_IRQ_CHIP 11 select GENERIC_IRQ_CHIP
12 select NO_IOPORT 12 select NO_IOPORT
@@ -15,12 +15,10 @@ config PLAT_SAMSUNG
15 15
16config PLAT_S5P 16config PLAT_S5P
17 bool 17 bool
18 depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS) 18 depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210)
19 default y 19 default y
20 select ARCH_REQUIRE_GPIOLIB 20 select ARCH_REQUIRE_GPIOLIB
21 select ARM_GIC if ARCH_EXYNOS 21 select ARM_VIC
22 select ARM_VIC if !ARCH_EXYNOS
23 select GIC_NON_BANKED if ARCH_EXYNOS4
24 select NO_IOPORT 22 select NO_IOPORT
25 select PLAT_SAMSUNG 23 select PLAT_SAMSUNG
26 select S3C_GPIO_TRACK 24 select S3C_GPIO_TRACK
@@ -60,6 +58,20 @@ config S3C_LOWLEVEL_UART_PORT
60 this configuration should be between zero and two. The port 58 this configuration should be between zero and two. The port
61 must have been initialised by the boot-loader before use. 59 must have been initialised by the boot-loader before use.
62 60
61config SAMSUNG_ATAGS
62 def_bool n
63 depends on !ARCH_MULTIPLATFORM
64 depends on ATAGS
65 help
66 This option enables ATAGS based boot support code for
67 Samsung platforms, including static platform devices, legacy
68 clock, timer and interrupt initialization, etc.
69
70 Platforms that support only DT based boot need not to select
71 this option.
72
73if SAMSUNG_ATAGS
74
63# timer options 75# timer options
64 76
65config SAMSUNG_HRT 77config SAMSUNG_HRT
@@ -367,11 +379,6 @@ config S5P_DEV_JPEG
367 help 379 help
368 Compile in platform device definitions for JPEG codec 380 Compile in platform device definitions for JPEG codec
369 381
370config S5P_DEV_MFC
371 bool
372 help
373 Compile in setup memory (init) code for MFC
374
375config S5P_DEV_ONENAND 382config S5P_DEV_ONENAND
376 bool 383 bool
377 help 384 help
@@ -412,6 +419,21 @@ config S3C_DMA
412 help 419 help
413 Internal configuration for S3C DMA core 420 Internal configuration for S3C DMA core
414 421
422config S5P_IRQ_PM
423 bool
424 default y if S5P_PM
425 help
426 Legacy IRQ power management for S5P platforms
427
428config SAMSUNG_PM_GPIO
429 bool
430 default y if GPIO_SAMSUNG && PM
431 help
432 Include legacy GPIO power management code for platforms not using
433 pinctrl-samsung driver.
434
435endif
436
415config SAMSUNG_DMADEV 437config SAMSUNG_DMADEV
416 bool 438 bool
417 select ARM_AMBA 439 select ARM_AMBA
@@ -421,6 +443,11 @@ config SAMSUNG_DMADEV
421 help 443 help
422 Use DMA device engine for PL330 DMAC. 444 Use DMA device engine for PL330 DMAC.
423 445
446config S5P_DEV_MFC
447 bool
448 help
449 Compile in setup memory (init) code for MFC
450
424comment "Power management" 451comment "Power management"
425 452
426config SAMSUNG_PM_DEBUG 453config SAMSUNG_PM_DEBUG
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 03cea140cfd0..98d07d8fc7a7 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -31,10 +31,10 @@ obj-$(CONFIG_S3C_ADC) += adc.o
31 31
32# devices 32# devices
33 33
34obj-y += platformdata.o 34obj-$(CONFIG_SAMSUNG_ATAGS) += platformdata.o
35 35
36obj-y += devs.o 36obj-$(CONFIG_SAMSUNG_ATAGS) += devs.o
37obj-y += dev-uart.o 37obj-$(CONFIG_SAMSUNG_ATAGS) += dev-uart.o
38obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o 38obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o
39obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o 39obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o
40 40
@@ -52,11 +52,12 @@ obj-$(CONFIG_SAMSUNG_DMADEV) += dma-ops.o
52# PM support 52# PM support
53 53
54obj-$(CONFIG_PM) += pm.o 54obj-$(CONFIG_PM) += pm.o
55obj-$(CONFIG_PM) += pm-gpio.o 55obj-$(CONFIG_SAMSUNG_PM_GPIO) += pm-gpio.o
56obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o 56obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o
57 57
58obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o 58obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o
59obj-$(CONFIG_SAMSUNG_WDT_RESET) += watchdog-reset.o 59obj-$(CONFIG_SAMSUNG_WDT_RESET) += watchdog-reset.o
60 60
61obj-$(CONFIG_S5P_PM) += s5p-pm.o s5p-irq-pm.o 61obj-$(CONFIG_S5P_PM) += s5p-pm.o
62obj-$(CONFIG_S5P_IRQ_PM) += s5p-irq-pm.o
62obj-$(CONFIG_S5P_SLEEP) += s5p-sleep.o 63obj-$(CONFIG_S5P_SLEEP) += s5p-sleep.o
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 {
28 const char *name; 28 const char *name;
29 29
30 unsigned long channels[S3C_DMA_CHANNELS]; 30 unsigned long channels[S3C_DMA_CHANNELS];
31 unsigned long channels_rx[S3C_DMA_CHANNELS];
32}; 31};
33 32
34struct s3c24xx_dma_selection { 33struct s3c24xx_dma_selection {
@@ -38,10 +37,6 @@ struct s3c24xx_dma_selection {
38 37
39 void (*select)(struct s3c2410_dma_chan *chan, 38 void (*select)(struct s3c2410_dma_chan *chan,
40 struct s3c24xx_dma_map *map); 39 struct s3c24xx_dma_map *map);
41
42 void (*direction)(struct s3c2410_dma_chan *chan,
43 struct s3c24xx_dma_map *map,
44 enum dma_data_direction dir);
45}; 40};
46 41
47extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); 42extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel);
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);
166 */ 166 */
167extern void s3c_pm_configure_extint(void); 167extern void s3c_pm_configure_extint(void);
168 168
169#ifdef CONFIG_GPIO_SAMSUNG
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
186static inline void samsung_pm_restore_gpios(void) {}
187static inline void samsung_pm_save_gpios(void) {}
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/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)
87} 87}
88 88
89/* uart management */ 89/* uart management */
90 90#if IS_ENABLED(CONFIG_SAMSUNG_ATAGS)
91static int nr_uarts __initdata = 0; 91static int nr_uarts __initdata = 0;
92 92
93static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS]; 93static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS];
@@ -134,11 +134,12 @@ void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no)
134 if (cpu == NULL) 134 if (cpu == NULL)
135 return; 135 return;
136 136
137 if (cpu->init_uarts == NULL) { 137 if (cpu->init_uarts == NULL && IS_ENABLED(CONFIG_SAMSUNG_ATAGS)) {
138 printk(KERN_ERR "s3c24xx_init_uarts: cpu has no uart init\n"); 138 printk(KERN_ERR "s3c24xx_init_uarts: cpu has no uart init\n");
139 } else 139 } else
140 (cpu->init_uarts)(cfg, no); 140 (cpu->init_uarts)(cfg, no);
141} 141}
142#endif
142 143
143static int __init s3c_arch_init(void) 144static int __init s3c_arch_init(void)
144{ 145{
@@ -152,8 +153,9 @@ static int __init s3c_arch_init(void)
152 ret = (cpu->init)(); 153 ret = (cpu->init)();
153 if (ret != 0) 154 if (ret != 0)
154 return ret; 155 return ret;
155 156#if IS_ENABLED(CONFIG_SAMSUNG_ATAGS)
156 ret = platform_add_devices(s3c24xx_uart_devs, nr_uarts); 157 ret = platform_add_devices(s3c24xx_uart_devs, nr_uarts);
158#endif
157 return ret; 159 return ret;
158} 160}
159 161
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 = {
192 .resume = samsung_gpio_pm_2bit_resume, 192 .resume = samsung_gpio_pm_2bit_resume,
193}; 193};
194 194
195#if defined(CONFIG_ARCH_S3C64XX) || defined(CONFIG_PLAT_S5P) 195#if defined(CONFIG_ARCH_S3C64XX) || defined(CONFIG_PLAT_S5P) \
196 || defined(CONFIG_ARCH_EXYNOS)
196static void samsung_gpio_pm_4bit_save(struct samsung_gpio_chip *chip) 197static void samsung_gpio_pm_4bit_save(struct samsung_gpio_chip *chip)
197{ 198{
198 chip->pm_save[1] = __raw_readl(chip->base + OFFS_CON); 199 chip->pm_save[1] = __raw_readl(chip->base + OFFS_CON);
@@ -302,7 +303,7 @@ struct samsung_gpio_pm samsung_gpio_pm_4bit = {
302 .save = samsung_gpio_pm_4bit_save, 303 .save = samsung_gpio_pm_4bit_save,
303 .resume = samsung_gpio_pm_4bit_resume, 304 .resume = samsung_gpio_pm_4bit_resume,
304}; 305};
305#endif /* CONFIG_ARCH_S3C64XX || CONFIG_PLAT_S5P */ 306#endif /* CONFIG_ARCH_S3C64XX || CONFIG_PLAT_S5P || CONFIG_ARCH_EXYNOS */
306 307
307/** 308/**
308 * samsung_pm_save_gpio() - save gpio chip data for suspend 309 * samsung_pm_save_gpio() - save gpio chip data for suspend
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index bd7124c87fea..ea3613642451 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -22,13 +22,17 @@
22 22
23#include <asm/cacheflush.h> 23#include <asm/cacheflush.h>
24#include <asm/suspend.h> 24#include <asm/suspend.h>
25#include <mach/hardware.h>
26#include <mach/map.h>
27 25
28#include <plat/regs-serial.h> 26#include <plat/regs-serial.h>
27
28#ifdef CONFIG_SAMSUNG_ATAGS
29#include <mach/hardware.h>
30#include <mach/map.h>
29#include <mach/regs-clock.h> 31#include <mach/regs-clock.h>
30#include <mach/regs-irq.h> 32#include <mach/regs-irq.h>
31#include <mach/irqs.h> 33#include <mach/irqs.h>
34#endif
35
32#include <asm/irq.h> 36#include <asm/irq.h>
33 37
34#include <plat/pm.h> 38#include <plat/pm.h>
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 @@
17#include <linux/of_fdt.h> 17#include <linux/of_fdt.h>
18#include <linux/of.h> 18#include <linux/of.h>
19 19
20#include <plat/mfc.h>
21
22#ifdef CONFIG_SAMSUNG_ATAGS
20#include <mach/map.h> 23#include <mach/map.h>
21#include <mach/irqs.h> 24#include <mach/irqs.h>
22#include <plat/devs.h> 25#include <plat/devs.h>
23#include <plat/mfc.h>
24 26
25static struct resource s5p_mfc_resource[] = { 27static struct resource s5p_mfc_resource[] = {
26 [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K), 28 [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K),
@@ -61,6 +63,10 @@ struct platform_device s5p_device_mfc_r = {
61 .coherent_dma_mask = DMA_BIT_MASK(32), 63 .coherent_dma_mask = DMA_BIT_MASK(32),
62 }, 64 },
63}; 65};
66#else
67static struct platform_device s5p_device_mfc_l;
68static struct platform_device s5p_device_mfc_r;
69#endif
64 70
65struct s5p_mfc_reserved_mem { 71struct s5p_mfc_reserved_mem {
66 phys_addr_t base; 72 phys_addr_t base;
@@ -70,6 +76,7 @@ struct s5p_mfc_reserved_mem {
70 76
71static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initdata; 77static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initdata;
72 78
79
73void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, 80void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize,
74 phys_addr_t lbase, unsigned int lsize) 81 phys_addr_t lbase, unsigned int lsize)
75{ 82{
@@ -93,6 +100,7 @@ void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize,
93 } 100 }
94} 101}
95 102
103#ifdef CONFIG_SAMSUNG_ATAGS
96static int __init s5p_mfc_memory_init(void) 104static int __init s5p_mfc_memory_init(void)
97{ 105{
98 int i; 106 int i;
@@ -111,6 +119,7 @@ static int __init s5p_mfc_memory_init(void)
111 return 0; 119 return 0;
112} 120}
113device_initcall(s5p_mfc_memory_init); 121device_initcall(s5p_mfc_memory_init);
122#endif
114 123
115#ifdef CONFIG_OF 124#ifdef CONFIG_OF
116int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname, 125int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname,