aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorHeiko Stuebner <heiko@sntech.de>2012-03-07 04:53:17 -0500
committerKukjin Kim <kgene.kim@samsung.com>2012-03-07 04:53:17 -0500
commit46cdaba11d6d66e834916850c293396399cf8736 (patch)
treed44b13e4f425f1c7c34bee45102f69aed7cf609c /arch/arm
parentb099095445483358eef1b8e15a7bad4e96c325fc (diff)
ARM: S3C24XX: Reuse S3C2443 dma for S3C2416
The dma controller is similar in S3C2443 and S3C2416 and has also the same register layout with the same REQSEL-bits in the source select. The only small difference is the SIO channel of the S3C2443 for the non-hsmmc controller which is not present on S3C2416/2450 and second spi channel which is not present on the S3C2416. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-s3c24xx/Kconfig10
-rw-r--r--arch/arm/mach-s3c24xx/Makefile2
-rw-r--r--arch/arm/mach-s3c24xx/dma-s3c2443.c22
-rw-r--r--arch/arm/plat-samsung/include/plat/regs-dma.h2
4 files changed, 27 insertions, 9 deletions
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index b399021ed6eb..0f3a327ebcaa 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -42,7 +42,7 @@ config CPU_S3C2416
42 select CPU_LLSERIAL_S3C2440 42 select CPU_LLSERIAL_S3C2440
43 select SAMSUNG_CLKSRC 43 select SAMSUNG_CLKSRC
44 select S3C2443_COMMON 44 select S3C2443_COMMON
45 select S3C2416_DMA if S3C24XX_DMA 45 select S3C2443_DMA if S3C24XX_DMA
46 select S3C2416_PM if PM 46 select S3C2416_PM if PM
47 help 47 help
48 Support for the S3C2416 SoC from the S3C24XX line 48 Support for the S3C2416 SoC from the S3C24XX line
@@ -513,15 +513,15 @@ config S3C2443_COMMON
513 Common code for the S3C2443 and similar processors, which includes 513 Common code for the S3C2443 and similar processors, which includes
514 the S3C2416 and S3C2450. 514 the S3C2416 and S3C2450.
515 515
516endif # CPU_S3C2443 || CPU_S3C2416
517
518if CPU_S3C2443
519
520config S3C2443_DMA 516config S3C2443_DMA
521 bool 517 bool
522 help 518 help
523 Internal config node for S3C2443 DMA support 519 Internal config node for S3C2443 DMA support
524 520
521endif # CPU_S3C2443 || CPU_S3C2416
522
523if CPU_S3C2443
524
525comment "S3C2443 Boards" 525comment "S3C2443 Boards"
526 526
527config MACH_SMDK2443 527config MACH_SMDK2443
diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index 3f39e6fc4b23..3518fe812d5f 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -32,11 +32,11 @@ obj-$(CONFIG_CPU_S3C244X) += s3c244x.o irq-s3c244x.o clock-s3c244x.o
32obj-$(CONFIG_S3C2440_DMA) += dma-s3c2440.o 32obj-$(CONFIG_S3C2440_DMA) += dma-s3c2440.o
33 33
34obj-$(CONFIG_CPU_S3C2443) += s3c2443.o irq-s3c2443.o clock-s3c2443.o 34obj-$(CONFIG_CPU_S3C2443) += s3c2443.o irq-s3c2443.o clock-s3c2443.o
35obj-$(CONFIG_S3C2443_DMA) += dma-s3c2443.o
36 35
37# common code 36# common code
38 37
39obj-$(CONFIG_S3C2443_COMMON) += common-s3c2443.o 38obj-$(CONFIG_S3C2443_COMMON) += common-s3c2443.o
39obj-$(CONFIG_S3C2443_DMA) += dma-s3c2443.o
40 40
41# 41#
42# machine support 42# machine support
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2443.c b/arch/arm/mach-s3c24xx/dma-s3c2443.c
index 03fe4bedc8af..2504474389de 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2443.c
@@ -51,7 +51,7 @@ static struct s3c24xx_dma_map __initdata s3c2443_dma_mappings[] = {
51 .name = "xdreq1", 51 .name = "xdreq1",
52 .channels = MAP(S3C2443_DMAREQSEL_XDREQ1), 52 .channels = MAP(S3C2443_DMAREQSEL_XDREQ1),
53 }, 53 },
54 [DMACH_SDI] = { 54 [DMACH_SDI] = { /* only on S3C2443 */
55 .name = "sdi", 55 .name = "sdi",
56 .channels = MAP(S3C2443_DMAREQSEL_SDI), 56 .channels = MAP(S3C2443_DMAREQSEL_SDI),
57 }, 57 },
@@ -59,7 +59,7 @@ static struct s3c24xx_dma_map __initdata s3c2443_dma_mappings[] = {
59 .name = "spi0", 59 .name = "spi0",
60 .channels = MAP(S3C2443_DMAREQSEL_SPI0TX), 60 .channels = MAP(S3C2443_DMAREQSEL_SPI0TX),
61 }, 61 },
62 [DMACH_SPI1] = { 62 [DMACH_SPI1] = { /* only on S3C2443/S3C2450 */
63 .name = "spi1", 63 .name = "spi1",
64 .channels = MAP(S3C2443_DMAREQSEL_SPI1TX), 64 .channels = MAP(S3C2443_DMAREQSEL_SPI1TX),
65 }, 65 },
@@ -141,6 +141,23 @@ static int __init s3c2443_dma_add(struct device *dev)
141 return s3c24xx_dma_init_map(&s3c2443_dma_sel); 141 return s3c24xx_dma_init_map(&s3c2443_dma_sel);
142} 142}
143 143
144#ifdef CONFIG_CPU_S3C2416
145/* S3C2416 DMA contains the same selection table as the S3C2443 */
146static struct subsys_interface s3c2416_dma_interface = {
147 .name = "s3c2416_dma",
148 .subsys = &s3c2416_subsys,
149 .add_dev = s3c2443_dma_add,
150};
151
152static int __init s3c2416_dma_init(void)
153{
154 return subsys_interface_register(&s3c2416_dma_interface);
155}
156
157arch_initcall(s3c2416_dma_init);
158#endif
159
160#ifdef CONFIG_CPU_S3C2443
144static struct subsys_interface s3c2443_dma_interface = { 161static struct subsys_interface s3c2443_dma_interface = {
145 .name = "s3c2443_dma", 162 .name = "s3c2443_dma",
146 .subsys = &s3c2443_subsys, 163 .subsys = &s3c2443_subsys,
@@ -153,3 +170,4 @@ static int __init s3c2443_dma_init(void)
153} 170}
154 171
155arch_initcall(s3c2443_dma_init); 172arch_initcall(s3c2443_dma_init);
173#endif
diff --git a/arch/arm/plat-samsung/include/plat/regs-dma.h b/arch/arm/plat-samsung/include/plat/regs-dma.h
index 178bccbe4804..a7d622ef16af 100644
--- a/arch/arm/plat-samsung/include/plat/regs-dma.h
+++ b/arch/arm/plat-samsung/include/plat/regs-dma.h
@@ -119,7 +119,7 @@
119#define S3C2412_DMAREQSEL_UART2_1 S3C2412_DMAREQSEL_SRC(24) 119#define S3C2412_DMAREQSEL_UART2_1 S3C2412_DMAREQSEL_SRC(24)
120#endif /* CONFIG_CPU_S3C2412 */ 120#endif /* CONFIG_CPU_S3C2412 */
121 121
122#ifdef CONFIG_CPU_S3C2443 122#if defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2443)
123 123
124#define S3C2443_DMAREQSEL_SRC(x) ((x) << 1) 124#define S3C2443_DMAREQSEL_SRC(x) ((x) << 1)
125 125