aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJassi Brar <jassi.brar@samsung.com>2010-11-22 01:35:53 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-23 09:04:44 -0500
commit83e37b8e400ca51cc97946815b3055daacd92fa8 (patch)
tree5c8fac6e05dc7e5f5a7ff420bf5a0a9e42f613d7
parent58bb4072132c54d832082cc6eac396a6db009cbd (diff)
ARM: Samsung: Define common audio-dma device
The ASoC uses common DMA driver for Audio devices. So it makes sense to a common audio-dma device shared across all platforms. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c2
-rw-r--r--arch/arm/mach-s3c2440/mach-rx1950.c2
-rw-r--r--arch/arm/mach-s3c64xx/dev-audio.c13
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6410.c2
-rw-r--r--arch/arm/plat-s3c24xx/devs.c17
-rw-r--r--arch/arm/plat-samsung/Makefile1
-rw-r--r--arch/arm/plat-samsung/dev-asocdma.c24
-rw-r--r--arch/arm/plat-samsung/include/plat/devs.h2
8 files changed, 31 insertions, 32 deletions
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index d7ada8c7e41f..1a81fe12ccd7 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -387,7 +387,7 @@ static struct platform_device *h1940_devices[] __initdata = {
387 &s3c_device_wdt, 387 &s3c_device_wdt,
388 &s3c_device_i2c0, 388 &s3c_device_i2c0,
389 &s3c_device_iis, 389 &s3c_device_iis,
390 &s3c_device_pcm, 390 &samsung_asoc_dma,
391 &s3c_device_usbgadget, 391 &s3c_device_usbgadget,
392 &h1940_device_leds, 392 &h1940_device_leds,
393 &h1940_device_bluetooth, 393 &h1940_device_bluetooth,
diff --git a/arch/arm/mach-s3c2440/mach-rx1950.c b/arch/arm/mach-s3c2440/mach-rx1950.c
index e0622bbb6dfa..eab6ae50683c 100644
--- a/arch/arm/mach-s3c2440/mach-rx1950.c
+++ b/arch/arm/mach-s3c2440/mach-rx1950.c
@@ -692,7 +692,7 @@ static struct platform_device *rx1950_devices[] __initdata = {
692 &s3c_device_wdt, 692 &s3c_device_wdt,
693 &s3c_device_i2c0, 693 &s3c_device_i2c0,
694 &s3c_device_iis, 694 &s3c_device_iis,
695 &s3c_device_pcm, 695 &samsung_asoc_dma,
696 &s3c_device_usbgadget, 696 &s3c_device_usbgadget,
697 &s3c_device_rtc, 697 &s3c_device_rtc,
698 &s3c_device_nand, 698 &s3c_device_nand,
diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c
index bbaf7b3fa8ae..4a4b8a505ff9 100644
--- a/arch/arm/mach-s3c64xx/dev-audio.c
+++ b/arch/arm/mach-s3c64xx/dev-audio.c
@@ -315,16 +315,3 @@ void __init s3c64xx_ac97_setup_gpio(int num)
315 else 315 else
316 s3c_ac97_pdata.cfg_gpio = s3c64xx_ac97_cfg_gpe; 316 s3c_ac97_pdata.cfg_gpio = s3c64xx_ac97_cfg_gpe;
317} 317}
318
319static u64 s3c_device_audio_dmamask = 0xffffffffUL;
320
321struct platform_device s3c_device_pcm = {
322 .name = "samsung-audio",
323 .id = -1,
324 .dev = {
325 .dma_mask = &s3c_device_audio_dmamask,
326 .coherent_dma_mask = 0xffffffffUL
327 }
328};
329EXPORT_SYMBOL(s3c_device_pcm);
330
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index 77488facfe4c..e85192a86fbe 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -283,7 +283,7 @@ static struct platform_device *smdk6410_devices[] __initdata = {
283 &s3c_device_fb, 283 &s3c_device_fb,
284 &s3c_device_ohci, 284 &s3c_device_ohci,
285 &s3c_device_usb_hsotg, 285 &s3c_device_usb_hsotg,
286 &s3c_device_pcm, 286 &samsung_asoc_dma,
287 &s3c64xx_device_iisv4, 287 &s3c64xx_device_iisv4,
288 &samsung_device_keypad, 288 &samsung_device_keypad,
289 289
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c
index 4bf0b3912a69..5987f949e167 100644
--- a/arch/arm/plat-s3c24xx/devs.c
+++ b/arch/arm/plat-s3c24xx/devs.c
@@ -259,21 +259,6 @@ struct platform_device s3c_device_iis = {
259 259
260EXPORT_SYMBOL(s3c_device_iis); 260EXPORT_SYMBOL(s3c_device_iis);
261 261
262/* ASoC PCM DMA */
263
264static u64 s3c_device_audio_dmamask = 0xffffffffUL;
265
266struct platform_device s3c_device_pcm = {
267 .name = "samsung-audio",
268 .id = -1,
269 .dev = {
270 .dma_mask = &s3c_device_audio_dmamask,
271 .coherent_dma_mask = 0xffffffffUL
272 }
273};
274
275EXPORT_SYMBOL(s3c_device_pcm);
276
277/* RTC */ 262/* RTC */
278 263
279static struct resource s3c_rtc_resource[] = { 264static struct resource s3c_rtc_resource[] = {
@@ -496,6 +481,8 @@ static struct resource s3c_ac97_resource[] = {
496 }, 481 },
497}; 482};
498 483
484static u64 s3c_device_audio_dmamask = 0xffffffffUL;
485
499struct platform_device s3c_device_ac97 = { 486struct platform_device s3c_device_ac97 = {
500 .name = "s3c-ac97", 487 .name = "s3c-ac97",
501 .id = -1, 488 .id = -1,
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index afcce474af8e..19d8a16c3066 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -17,6 +17,7 @@ obj-y += clock.o
17obj-y += pwm-clock.o 17obj-y += pwm-clock.o
18obj-y += gpio.o 18obj-y += gpio.o
19obj-y += gpio-config.o 19obj-y += gpio-config.o
20obj-y += dev-asocdma.o
20 21
21obj-$(CONFIG_SAMSUNG_GPIOLIB_4BIT) += gpiolib.o 22obj-$(CONFIG_SAMSUNG_GPIOLIB_4BIT) += gpiolib.o
22obj-$(CONFIG_SAMSUNG_CLKSRC) += clock-clksrc.o 23obj-$(CONFIG_SAMSUNG_CLKSRC) += clock-clksrc.o
diff --git a/arch/arm/plat-samsung/dev-asocdma.c b/arch/arm/plat-samsung/dev-asocdma.c
new file mode 100644
index 000000000000..b7b1fcaab814
--- /dev/null
+++ b/arch/arm/plat-samsung/dev-asocdma.c
@@ -0,0 +1,24 @@
1/* linux/arch/arm/plat-samsung/dev-asocdma.c
2 *
3 * Copyright (c) 2010 Samsung Electronics Co. Ltd
4 * Jaswinder Singh <jassi.brar@samsung.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/platform_device.h>
12#include <linux/dma-mapping.h>
13
14static u64 audio_dmamask = DMA_BIT_MASK(32);
15
16struct platform_device samsung_asoc_dma = {
17 .name = "samsung-audio",
18 .id = -1,
19 .dev = {
20 .dma_mask = &audio_dmamask,
21 .coherent_dma_mask = DMA_BIT_MASK(32),
22 }
23};
24EXPORT_SYMBOL(samsung_asoc_dma);
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h
index dec0ded6a5ee..e9e3b6e3ec74 100644
--- a/arch/arm/plat-samsung/include/plat/devs.h
+++ b/arch/arm/plat-samsung/include/plat/devs.h
@@ -32,7 +32,7 @@ extern struct platform_device s3c64xx_device_iisv4;
32extern struct platform_device s3c64xx_device_spi0; 32extern struct platform_device s3c64xx_device_spi0;
33extern struct platform_device s3c64xx_device_spi1; 33extern struct platform_device s3c64xx_device_spi1;
34 34
35extern struct platform_device s3c_device_pcm; 35extern struct platform_device samsung_asoc_dma;
36 36
37extern struct platform_device s3c64xx_device_pcm0; 37extern struct platform_device s3c64xx_device_pcm0;
38extern struct platform_device s3c64xx_device_pcm1; 38extern struct platform_device s3c64xx_device_pcm1;