From: Jassi Brar <jassisinghbrar@gmail.com>
To: alsa-devel@alsa-project.org
Cc: kgene.kim@samsung.com, Jassi Brar <jassi.brar@samsung.com>,
broonie@opensource.wolfsonmicro.com, june.bae@samsung.com,
lrg@slimlogic.co.uk, sw.youn@samsung.com
Subject: [PATCHv4 03/18] ARM: Samsung: Define common audio-dma device
Date: Mon, 22 Nov 2010 15:35:53 +0900 [thread overview]
Message-ID: <1290407753-29092-1-git-send-email-jassisinghbrar@gmail.com> (raw)
In-Reply-To: <1290407690-28917-1-git-send-email-jassisinghbrar@gmail.com>
From: Jassi Brar <jassi.brar@samsung.com>
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>
---
arch/arm/mach-s3c2410/mach-h1940.c | 2 +-
arch/arm/mach-s3c2440/mach-rx1950.c | 2 +-
arch/arm/mach-s3c64xx/dev-audio.c | 13 -------------
arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +-
arch/arm/plat-s3c24xx/devs.c | 17 ++---------------
arch/arm/plat-samsung/Makefile | 1 +
arch/arm/plat-samsung/dev-asocdma.c | 24 ++++++++++++++++++++++++
arch/arm/plat-samsung/include/plat/devs.h | 2 +-
8 files changed, 31 insertions(+), 32 deletions(-)
create mode 100644 arch/arm/plat-samsung/dev-asocdma.c
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index d7ada8c..1a81fe1 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 = {
&s3c_device_wdt,
&s3c_device_i2c0,
&s3c_device_iis,
- &s3c_device_pcm,
+ &samsung_asoc_dma,
&s3c_device_usbgadget,
&h1940_device_leds,
&h1940_device_bluetooth,
diff --git a/arch/arm/mach-s3c2440/mach-rx1950.c b/arch/arm/mach-s3c2440/mach-rx1950.c
index e0622bb..eab6ae5 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 = {
&s3c_device_wdt,
&s3c_device_i2c0,
&s3c_device_iis,
- &s3c_device_pcm,
+ &samsung_asoc_dma,
&s3c_device_usbgadget,
&s3c_device_rtc,
&s3c_device_nand,
diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c
index bbaf7b3..4a4b8a5 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)
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);
-
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index 77488fa..e85192a 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 = {
&s3c_device_fb,
&s3c_device_ohci,
&s3c_device_usb_hsotg,
- &s3c_device_pcm,
+ &samsung_asoc_dma,
&s3c64xx_device_iisv4,
&samsung_device_keypad,
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c
index 4bf0b39..5987f94 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 = {
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,
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index afcce47..19d8a16 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -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
index 0000000..b7b1fca
--- /dev/null
+++ b/arch/arm/plat-samsung/dev-asocdma.c
@@ -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);
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h
index dec0ded..e9e3b6e 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;
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;
--
1.6.2.5
next prev parent reply other threads:[~2010-11-22 6:45 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 1:30 [PATCHv3] ASoC: Overhaul Samsung drivers Jassi Brar
2010-10-26 1:31 ` [PATCH 01/18] ASoC: Samsung: Remove redundant AQUILA driver Jassi Brar
2010-10-26 1:32 ` [PATCH 02/18] ASoC: Samsung: Rename DMA device Jassi Brar
2010-10-26 1:33 ` [PATCH 05/18] ASoC: Samsung: Rename AC97 platform device Jassi Brar
2010-10-26 1:33 ` [PATCH 04/18] ASoC: Samsung: Rename ASoC DMA driver Jassi Brar
2010-10-26 1:33 ` [PATCH 03/18] ARM: Samsung: Define common audio-dma device Jassi Brar
2010-10-26 1:33 ` [PATCH 06/18] ASoC: Samsung: Rename AC97 driver Jassi Brar
2010-10-26 1:33 ` [PATCH 09/18] ASoC: Samsung: Rename s3c64xx I2S device Jassi Brar
2010-10-26 1:33 ` [PATCH 08/18] ASoC: Samsung: Generalize DMA driver namespace Jassi Brar
2010-10-26 1:33 ` [PATCH 07/18] ASoC: Samsung: Rename PCM driver Jassi Brar
2010-10-26 1:33 ` [PATCH 11/18] ASoC: SMARTQ: Move to use new I2S driver Jassi Brar
2010-10-26 1:33 ` [PATCH 13/18] ASoC: SMDK64XX: " Jassi Brar
2010-10-26 1:33 ` [PATCH 12/18] ASoC: GONI: " Jassi Brar
2010-10-26 1:33 ` [PATCH 10/18] ASoC: Samsung: Add common " Jassi Brar
2010-10-26 1:33 ` [PATCH 15/18] ASoC: SMDK64XX: Rename for other platforms Jassi Brar
2010-10-26 1:33 ` [PATCH 14/18] ASoC: S3C64XX: Remove obsoleted I2S drivers Jassi Brar
2010-10-26 1:33 ` [PATCH 16/18] ASoC: SMDK_WM8580: Enable for SMDKC100 Jassi Brar
2010-10-26 1:33 ` [PATCH 18/18] ASoC: Samsung: Rename from s3c24xx to samsung Jassi Brar
2010-10-26 1:33 ` [PATCH 17/18] ASoC: Samsung: Generalize Kconfig symbols Jassi Brar
2010-11-22 6:34 ` [PATCHv4] ASoC: Overhaul Samsung drivers Jassi Brar
2010-11-22 6:35 ` [PATCHv4 01/18] ASoC: Samsung: Remove redundant AQUILA driver Jassi Brar
2010-11-22 6:35 ` [PATCHv4 02/18] ASoC: Samsung: Rename DMA device Jassi Brar
2010-11-22 7:05 ` Kukjin Kim
2010-11-22 6:35 ` Jassi Brar [this message]
2010-11-22 7:07 ` [PATCHv4 03/18] ARM: Samsung: Define common audio-dma device Kukjin Kim
2010-11-22 6:35 ` [PATCHv4 04/18] ASoC: Samsung: Rename ASoC DMA driver Jassi Brar
2010-11-22 6:36 ` [PATCHv4 05/18] ASoC: Samsung: Rename AC97 platform device Jassi Brar
2010-11-22 7:09 ` Kukjin Kim
2010-11-22 6:36 ` [PATCHv4 06/18] ASoC: Samsung: Rename AC97 driver Jassi Brar
2010-11-22 6:36 ` [PATCHv4 07/18] ASoC: Samsung: Rename PCM driver Jassi Brar
2010-11-22 6:36 ` [PATCHv4 08/18] ASoC: Samsung: Generalize DMA driver namespace Jassi Brar
2010-11-22 6:36 ` [PATCHv4 09/18] ASoC: Samsung: Rename s3c64xx I2S device Jassi Brar
2010-11-22 6:36 ` [PATCHv4 10/18] ASoC: Samsung: Add common I2S driver Jassi Brar
2010-11-22 6:37 ` [PATCHv4 11/18] ASoC: SMARTQ: Move to use new " Jassi Brar
2010-11-22 6:37 ` [PATCHv4 12/18] ASoC: GONI: " Jassi Brar
2010-11-22 6:37 ` [PATCHv4 13/18] ASoC: SMDK64XX: " Jassi Brar
2010-11-22 6:37 ` [PATCHv4 14/18] ASoC: S3C64XX: Remove obsoleted I2S drivers Jassi Brar
2010-11-22 6:37 ` [PATCHv4 15/18] ASoC: SMDK64XX: Rename for other platforms Jassi Brar
2010-11-22 6:37 ` [PATCHv4 16/18] ASoC: SMDK_WM8580: Enable for SMDKC100 Jassi Brar
2010-11-22 7:13 ` Kukjin Kim
2010-11-22 6:37 ` [PATCHv4 17/18] ASoC: Samsung: Generalize Kconfig symbols Jassi Brar
2010-11-23 14:12 ` Mark Brown
2010-11-23 14:16 ` Jassi Brar
2010-11-23 14:25 ` Mark Brown
2010-11-22 6:37 ` [PATCHv4 18/18] ASoC: Samsung: Rename from s3c24xx to samsung Jassi Brar
2010-11-23 14:23 ` [PATCHv4] ASoC: Overhaul Samsung drivers Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1290407753-29092-1-git-send-email-jassisinghbrar@gmail.com \
--to=jassisinghbrar@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=jassi.brar@samsung.com \
--cc=june.bae@samsung.com \
--cc=kgene.kim@samsung.com \
--cc=lrg@slimlogic.co.uk \
--cc=sw.youn@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).