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: [PATCH 03/18] ARM: Samsung: Define common audio-dma device
Date: Tue, 26 Oct 2010 10:33:39 +0900 [thread overview]
Message-ID: <1288056819-24838-1-git-send-email-jassisinghbrar@gmail.com> (raw)
In-Reply-To: <1288056632-24673-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-s3c64xx/dev-audio.c | 13 -------------
arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +-
arch/arm/plat-s3c24xx/devs.c | 15 ---------------
arch/arm/plat-samsung/Makefile | 1 +
arch/arm/plat-samsung/dev-asocdma.c | 24 ++++++++++++++++++++++++
arch/arm/plat-samsung/include/plat/devs.h | 2 +-
6 files changed, 27 insertions(+), 30 deletions(-)
create mode 100644 arch/arm/plat-samsung/dev-asocdma.c
diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c
index c45cc37..c730dd2 100644
--- a/arch/arm/mach-s3c64xx/dev-audio.c
+++ b/arch/arm/mach-s3c64xx/dev-audio.c
@@ -336,16 +336,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 ecbddd3..e2b18b8 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..d8fb4e6 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[] = {
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 4d8ff92..b97623a 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 a9fecd6..21dfa68 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-10-26 1:39 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 06/18] ASoC: Samsung: Rename AC97 driver Jassi Brar
2010-10-26 1:33 ` [PATCH 05/18] ASoC: Samsung: Rename AC97 platform device Jassi Brar
2010-10-26 1:33 ` Jassi Brar [this message]
2010-10-26 1:33 ` [PATCH 04/18] ASoC: Samsung: Rename ASoC DMA 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 07/18] ASoC: Samsung: Rename PCM driver Jassi Brar
2010-10-26 1:33 ` [PATCH 08/18] ASoC: Samsung: Generalize DMA driver namespace Jassi Brar
2010-10-26 1:33 ` [PATCH 12/18] ASoC: GONI: 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 10/18] ASoC: Samsung: Add common " Jassi Brar
2010-10-26 1:33 ` [PATCH 11/18] ASoC: SMARTQ: Move to use new " 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 15/18] ASoC: SMDK64XX: Rename for other platforms 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 ` [PATCHv4 03/18] ARM: Samsung: Define common audio-dma device Jassi Brar
2010-11-22 7:07 ` 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=1288056819-24838-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.