ARM: Samsung: Define common audio-dma device
authorJassi Brar <jassi.brar@samsung.com>
Mon, 22 Nov 2010 06:35:53 +0000 (15:35 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 23 Nov 2010 14:04:44 +0000 (14:04 +0000)
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>
arch/arm/mach-s3c2410/mach-h1940.c
arch/arm/mach-s3c2440/mach-rx1950.c
arch/arm/mach-s3c64xx/dev-audio.c
arch/arm/mach-s3c64xx/mach-smdk6410.c
arch/arm/plat-s3c24xx/devs.c
arch/arm/plat-samsung/Makefile
arch/arm/plat-samsung/dev-asocdma.c [new file with mode: 0644]
arch/arm/plat-samsung/include/plat/devs.h

index d7ada8c7e41f89a1d8bf5c525aa79c37c1eb1d97..1a81fe12ccd77287efe159adbc52e03056a467eb 100644 (file)
@@ -387,7 +387,7 @@ static struct platform_device *h1940_devices[] __initdata = {
        &s3c_device_wdt,
        &s3c_device_i2c0,
        &s3c_device_iis,
-       &s3c_device_pcm,
+       &samsung_asoc_dma,
        &s3c_device_usbgadget,
        &h1940_device_leds,
        &h1940_device_bluetooth,
index e0622bbb6dfafc1aea22783ac22626e4d72bb11e..eab6ae50683c6b42da97e3e0a677b7d87560c60f 100644 (file)
@@ -692,7 +692,7 @@ static struct platform_device *rx1950_devices[] __initdata = {
        &s3c_device_wdt,
        &s3c_device_i2c0,
        &s3c_device_iis,
-       &s3c_device_pcm,
+       &samsung_asoc_dma,
        &s3c_device_usbgadget,
        &s3c_device_rtc,
        &s3c_device_nand,
index bbaf7b3fa8ae0b9403e21bbe817c8448cc52effd..4a4b8a505ff9d397abc24409992cd6081c90dad8 100644 (file)
@@ -315,16 +315,3 @@ void __init s3c64xx_ac97_setup_gpio(int num)
        else
                s3c_ac97_pdata.cfg_gpio = s3c64xx_ac97_cfg_gpe;
 }
-
-static u64 s3c_device_audio_dmamask = 0xffffffffUL;
-
-struct platform_device s3c_device_pcm = {
-       .name             = "samsung-audio",
-       .id               = -1,
-       .dev              = {
-               .dma_mask = &s3c_device_audio_dmamask,
-               .coherent_dma_mask = 0xffffffffUL
-       }
-};
-EXPORT_SYMBOL(s3c_device_pcm);
-
index 77488facfe4cab45ad9c8c9ea996e06138ec0074..e85192a86fbe1a9f51bb9da15f20899bf0b4ab3e 100644 (file)
@@ -283,7 +283,7 @@ static struct platform_device *smdk6410_devices[] __initdata = {
        &s3c_device_fb,
        &s3c_device_ohci,
        &s3c_device_usb_hsotg,
-       &s3c_device_pcm,
+       &samsung_asoc_dma,
        &s3c64xx_device_iisv4,
        &samsung_device_keypad,
 
index 4bf0b3912a690fe050c143db7a345b62b4d4e0f8..5987f949e167dfb80f778895b3e057d7f1be3cf1 100644 (file)
@@ -259,21 +259,6 @@ struct platform_device s3c_device_iis = {
 
 EXPORT_SYMBOL(s3c_device_iis);
 
-/* ASoC PCM DMA */
-
-static u64 s3c_device_audio_dmamask = 0xffffffffUL;
-
-struct platform_device s3c_device_pcm = {
-       .name             = "samsung-audio",
-       .id               = -1,
-       .dev              = {
-               .dma_mask = &s3c_device_audio_dmamask,
-               .coherent_dma_mask = 0xffffffffUL
-       }
-};
-
-EXPORT_SYMBOL(s3c_device_pcm);
-
 /* RTC */
 
 static struct resource s3c_rtc_resource[] = {
@@ -496,6 +481,8 @@ static struct resource s3c_ac97_resource[] = {
        },
 };
 
+static u64 s3c_device_audio_dmamask = 0xffffffffUL;
+
 struct platform_device s3c_device_ac97 = {
        .name             = "s3c-ac97",
        .id               = -1,
index afcce474af8e86d692a5a579387055bcf808cc3c..19d8a16c3066af686569f488ef0e4e32a7cedff8 100644 (file)
@@ -17,6 +17,7 @@ obj-y                         += clock.o
 obj-y                          += pwm-clock.o
 obj-y                          += gpio.o
 obj-y                          += gpio-config.o
+obj-y                          += dev-asocdma.o
 
 obj-$(CONFIG_SAMSUNG_GPIOLIB_4BIT)     += gpiolib.o
 obj-$(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 (file)
index 0000000..b7b1fca
--- /dev/null
@@ -0,0 +1,24 @@
+/* linux/arch/arm/plat-samsung/dev-asocdma.c
+ *
+ * Copyright (c) 2010 Samsung Electronics Co. Ltd
+ *     Jaswinder Singh <jassi.brar@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/platform_device.h>
+#include <linux/dma-mapping.h>
+
+static u64 audio_dmamask = DMA_BIT_MASK(32);
+
+struct platform_device samsung_asoc_dma = {
+       .name             = "samsung-audio",
+       .id               = -1,
+       .dev              = {
+               .dma_mask = &audio_dmamask,
+               .coherent_dma_mask = DMA_BIT_MASK(32),
+       }
+};
+EXPORT_SYMBOL(samsung_asoc_dma);
index dec0ded6a5eed7ad01218299f16e95ac8d01bb9a..e9e3b6e3ec745a9af4f78ec6249db3d3b2ad1cf8 100644 (file)
@@ -32,7 +32,7 @@ extern struct platform_device s3c64xx_device_iisv4;
 extern struct platform_device s3c64xx_device_spi0;
 extern struct platform_device s3c64xx_device_spi1;
 
-extern struct platform_device s3c_device_pcm;
+extern struct platform_device samsung_asoc_dma;
 
 extern struct platform_device s3c64xx_device_pcm0;
 extern struct platform_device s3c64xx_device_pcm1;