aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s3c24xx/common.c106
-rw-r--r--arch/arm/mach-s3c24xx/common.h3
-rw-r--r--arch/arm/mach-s3c24xx/mach-jive.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2413.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2416.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2443.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-vstms.c1
7 files changed, 114 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index 457261c98433..bdcb29f4ea31 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -31,6 +31,7 @@
31#include <linux/platform_device.h> 31#include <linux/platform_device.h>
32#include <linux/delay.h> 32#include <linux/delay.h>
33#include <linux/io.h> 33#include <linux/io.h>
34#include <linux/platform_data/dma-s3c24xx.h>
34 35
35#include <mach/hardware.h> 36#include <mach/hardware.h>
36#include <mach/regs-clock.h> 37#include <mach/regs-clock.h>
@@ -44,6 +45,7 @@
44 45
45#include <mach/regs-gpio.h> 46#include <mach/regs-gpio.h>
46#include <plat/regs-serial.h> 47#include <plat/regs-serial.h>
48#include <mach/dma.h>
47 49
48#include <plat/cpu.h> 50#include <plat/cpu.h>
49#include <plat/devs.h> 51#include <plat/devs.h>
@@ -329,3 +331,107 @@ void __init_or_cpufreq s3c24xx_setup_clocks(unsigned long fclk,
329 clk_p.rate = pclk; 331 clk_p.rate = pclk;
330 clk_f.rate = fclk; 332 clk_f.rate = fclk;
331} 333}
334
335#if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \
336 defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
337static struct resource s3c2410_dma_resource[] = {
338 [0] = DEFINE_RES_MEM(S3C24XX_PA_DMA, S3C24XX_SZ_DMA),
339 [1] = DEFINE_RES_IRQ(IRQ_DMA0),
340 [2] = DEFINE_RES_IRQ(IRQ_DMA1),
341 [3] = DEFINE_RES_IRQ(IRQ_DMA2),
342 [4] = DEFINE_RES_IRQ(IRQ_DMA3),
343};
344#endif
345
346#ifdef CONFIG_CPU_S3C2412
347static struct s3c24xx_dma_channel s3c2412_dma_channels[DMACH_MAX] = {
348 [DMACH_XD0] = { S3C24XX_DMA_AHB, true, 17 },
349 [DMACH_XD1] = { S3C24XX_DMA_AHB, true, 18 },
350 [DMACH_SDI] = { S3C24XX_DMA_APB, false, 10 },
351 [DMACH_SPI0_RX] = { S3C24XX_DMA_APB, true, 1 },
352 [DMACH_SPI0_TX] = { S3C24XX_DMA_APB, true, 0 },
353 [DMACH_SPI1_RX] = { S3C24XX_DMA_APB, true, 3 },
354 [DMACH_SPI1_TX] = { S3C24XX_DMA_APB, true, 2 },
355 [DMACH_UART0] = { S3C24XX_DMA_APB, true, 19 },
356 [DMACH_UART1] = { S3C24XX_DMA_APB, true, 21 },
357 [DMACH_UART2] = { S3C24XX_DMA_APB, true, 23 },
358 [DMACH_UART0_SRC2] = { S3C24XX_DMA_APB, true, 20 },
359 [DMACH_UART1_SRC2] = { S3C24XX_DMA_APB, true, 22 },
360 [DMACH_UART2_SRC2] = { S3C24XX_DMA_APB, true, 24 },
361 [DMACH_TIMER] = { S3C24XX_DMA_APB, true, 9 },
362 [DMACH_I2S_IN] = { S3C24XX_DMA_APB, true, 5 },
363 [DMACH_I2S_OUT] = { S3C24XX_DMA_APB, true, 4 },
364 [DMACH_USB_EP1] = { S3C24XX_DMA_APB, true, 13 },
365 [DMACH_USB_EP2] = { S3C24XX_DMA_APB, true, 14 },
366 [DMACH_USB_EP3] = { S3C24XX_DMA_APB, true, 15 },
367 [DMACH_USB_EP4] = { S3C24XX_DMA_APB, true, 16 },
368};
369
370static struct s3c24xx_dma_platdata s3c2412_dma_platdata = {
371 .num_phy_channels = 4,
372 .channels = s3c2412_dma_channels,
373 .num_channels = DMACH_MAX,
374};
375
376struct platform_device s3c2412_device_dma = {
377 .name = "s3c2412-dma",
378 .id = 0,
379 .num_resources = ARRAY_SIZE(s3c2410_dma_resource),
380 .resource = s3c2410_dma_resource,
381 .dev = {
382 .platform_data = &s3c2412_dma_platdata,
383 },
384};
385#endif
386
387#if defined(CONFIG_CPUS_3C2443) || defined(CONFIG_CPU_S3C2416)
388static struct resource s3c2443_dma_resource[] = {
389 [0] = DEFINE_RES_MEM(S3C24XX_PA_DMA, S3C24XX_SZ_DMA),
390 [1] = DEFINE_RES_IRQ(IRQ_S3C2443_DMA0),
391 [2] = DEFINE_RES_IRQ(IRQ_S3C2443_DMA1),
392 [3] = DEFINE_RES_IRQ(IRQ_S3C2443_DMA2),
393 [4] = DEFINE_RES_IRQ(IRQ_S3C2443_DMA3),
394 [5] = DEFINE_RES_IRQ(IRQ_S3C2443_DMA4),
395 [6] = DEFINE_RES_IRQ(IRQ_S3C2443_DMA5),
396};
397
398static struct s3c24xx_dma_channel s3c2443_dma_channels[DMACH_MAX] = {
399 [DMACH_XD0] = { S3C24XX_DMA_AHB, true, 17 },
400 [DMACH_XD1] = { S3C24XX_DMA_AHB, true, 18 },
401 [DMACH_SDI] = { S3C24XX_DMA_APB, false, 10 },
402 [DMACH_SPI0_RX] = { S3C24XX_DMA_APB, true, 1 },
403 [DMACH_SPI0_TX] = { S3C24XX_DMA_APB, true, 0 },
404 [DMACH_SPI1_RX] = { S3C24XX_DMA_APB, true, 3 },
405 [DMACH_SPI1_TX] = { S3C24XX_DMA_APB, true, 2 },
406 [DMACH_UART0] = { S3C24XX_DMA_APB, true, 19 },
407 [DMACH_UART1] = { S3C24XX_DMA_APB, true, 21 },
408 [DMACH_UART2] = { S3C24XX_DMA_APB, true, 23 },
409 [DMACH_UART3] = { S3C24XX_DMA_APB, true, 25 },
410 [DMACH_UART0_SRC2] = { S3C24XX_DMA_APB, true, 20 },
411 [DMACH_UART1_SRC2] = { S3C24XX_DMA_APB, true, 22 },
412 [DMACH_UART2_SRC2] = { S3C24XX_DMA_APB, true, 24 },
413 [DMACH_UART3_SRC2] = { S3C24XX_DMA_APB, true, 26 },
414 [DMACH_TIMER] = { S3C24XX_DMA_APB, true, 9 },
415 [DMACH_I2S_IN] = { S3C24XX_DMA_APB, true, 5 },
416 [DMACH_I2S_OUT] = { S3C24XX_DMA_APB, true, 4 },
417 [DMACH_PCM_IN] = { S3C24XX_DMA_APB, true, 28 },
418 [DMACH_PCM_OUT] = { S3C24XX_DMA_APB, true, 27 },
419 [DMACH_MIC_IN] = { S3C24XX_DMA_APB, true, 29 },
420};
421
422static struct s3c24xx_dma_platdata s3c2443_dma_platdata = {
423 .num_phy_channels = 6,
424 .channels = s3c2443_dma_channels,
425 .num_channels = DMACH_MAX,
426};
427
428struct platform_device s3c2443_device_dma = {
429 .name = "s3c2443-dma",
430 .id = 0,
431 .num_resources = ARRAY_SIZE(s3c2443_dma_resource),
432 .resource = s3c2443_dma_resource,
433 .dev = {
434 .platform_data = &s3c2443_dma_platdata,
435 },
436};
437#endif
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h
index 84b280654f4c..fe071893275f 100644
--- a/arch/arm/mach-s3c24xx/common.h
+++ b/arch/arm/mach-s3c24xx/common.h
@@ -109,4 +109,7 @@ extern void s3c2443_init_irq(void);
109 109
110extern struct syscore_ops s3c24xx_irq_syscore_ops; 110extern struct syscore_ops s3c24xx_irq_syscore_ops;
111 111
112extern struct platform_device s3c2412_device_dma;
113extern struct platform_device s3c2443_device_dma;
114
112#endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */ 115#endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
index a45fcd8ccf79..43c23e220f5b 100644
--- a/arch/arm/mach-s3c24xx/mach-jive.c
+++ b/arch/arm/mach-s3c24xx/mach-jive.c
@@ -466,6 +466,7 @@ static struct platform_device *jive_devices[] __initdata = {
466 &jive_device_wm8750, 466 &jive_device_wm8750,
467 &s3c_device_nand, 467 &s3c_device_nand,
468 &s3c_device_usbgadget, 468 &s3c_device_usbgadget,
469 &s3c2412_device_dma,
469}; 470};
470 471
471static struct s3c2410_udc_mach_info jive_udc_cfg __initdata = { 472static struct s3c2410_udc_mach_info jive_udc_cfg __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c24xx/mach-smdk2413.c
index 8146e920f10d..c9d31ef28dd1 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2413.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c
@@ -89,6 +89,7 @@ static struct platform_device *smdk2413_devices[] __initdata = {
89 &s3c_device_i2c0, 89 &s3c_device_i2c0,
90 &s3c_device_iis, 90 &s3c_device_iis,
91 &s3c_device_usbgadget, 91 &s3c_device_usbgadget,
92 &s3c2412_device_dma,
92}; 93};
93 94
94static void __init smdk2413_fixup(struct tag *tags, char **cmdline, 95static void __init smdk2413_fixup(struct tag *tags, char **cmdline,
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c
index cb46847c66b4..f88e672ad1e4 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c
@@ -215,6 +215,7 @@ static struct platform_device *smdk2416_devices[] __initdata = {
215 &s3c_device_hsmmc0, 215 &s3c_device_hsmmc0,
216 &s3c_device_hsmmc1, 216 &s3c_device_hsmmc1,
217 &s3c_device_usb_hsudc, 217 &s3c_device_usb_hsudc,
218 &s3c2443_device_dma,
218}; 219};
219 220
220static void __init smdk2416_map_io(void) 221static void __init smdk2416_map_io(void)
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c24xx/mach-smdk2443.c
index 9435c3bef18a..d9933fcc6cc8 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2443.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2443.c
@@ -115,6 +115,7 @@ static struct platform_device *smdk2443_devices[] __initdata = {
115#ifdef CONFIG_SND_SOC_SMDK2443_WM9710 115#ifdef CONFIG_SND_SOC_SMDK2443_WM9710
116 &s3c_device_ac97, 116 &s3c_device_ac97,
117#endif 117#endif
118 &s3c2443_device_dma,
118}; 119};
119 120
120static void __init smdk2443_map_io(void) 121static void __init smdk2443_map_io(void)
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx/mach-vstms.c
index b66588428ec9..f7ec9c550787 100644
--- a/arch/arm/mach-s3c24xx/mach-vstms.c
+++ b/arch/arm/mach-s3c24xx/mach-vstms.c
@@ -126,6 +126,7 @@ static struct platform_device *vstms_devices[] __initdata = {
126 &s3c_device_iis, 126 &s3c_device_iis,
127 &s3c_device_rtc, 127 &s3c_device_rtc,
128 &s3c_device_nand, 128 &s3c_device_nand,
129 &s3c2412_device_dma,
129}; 130};
130 131
131static void __init vstms_fixup(struct tag *tags, char **cmdline, 132static void __init vstms_fixup(struct tag *tags, char **cmdline,