Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
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, ben-linux@fluff.org,
	june.bae@samsung.com, lrg@slimlogic.co.uk, sw.youn@samsung.com
Subject: [PATCH 03/24] ARM: Samsung: Define common audio-dma device
Date: Fri, 22 Oct 2010 17:34:18 +0900	[thread overview]
Message-ID: <1287736458-11963-1-git-send-email-jassisinghbrar@gmail.com> (raw)
In-Reply-To: <1287736238-11846-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

  parent reply	other threads:[~2010-10-22  8:43 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22  8:30 [PATCHv2] ASoC: Overhaul Samsung drivers Jassi Brar
2010-10-22  8:31 ` [PATCH 01/24] ASoC: Samsung: Remove redundant AQUILA driver Jassi Brar
2010-10-22  8:32 ` [PATCH 02/24] ASoC: Samsung: Rename DMA device Jassi Brar
2010-10-22  8:34 ` Jassi Brar [this message]
2010-10-22  8:34 ` [PATCH 04/24] ASoC: Samsung: Rename ASoC DMA driver Jassi Brar
2010-10-22  8:34 ` [PATCH 05/24] ASoC: Samsung: Rename AC97 platform device Jassi Brar
2010-10-22  8:35 ` [PATCH 06/24] ASoC: Samsung: Rename AC97 driver Jassi Brar
2010-10-22  8:35 ` [PATCH 07/24] ASoC: Samsung: Rename PCM driver Jassi Brar
2010-10-22  8:35 ` [PATCH 08/24] ASoC: Samsung: Generalize DMA driver namespace Jassi Brar
2010-10-22  8:35 ` [PATCH 09/24] ASoC: Samsung: Rename s3c64xx I2S device Jassi Brar
2010-10-22  8:35 ` [PATCH 10/24] ASoC: Samsung: Add common I2S driver Jassi Brar
2010-10-22  8:36 ` [PATCH 11/24] ARM: S3C64XX: I2S: Upgrade platform device Jassi Brar
2010-10-22  8:36 ` [PATCH 12/24] ARM: S5P64X0: " Jassi Brar
2010-10-22  8:36 ` [PATCH 13/24] ARM: S5P6442: " Jassi Brar
2010-10-22  8:37 ` [PATCH 14/24] ARM: S5PC100: " Jassi Brar
2010-10-22  8:37 ` [PATCH 15/24] ARM: S5PV210: " Jassi Brar
2010-10-22  8:37 ` [PATCH 16/24] ARM: S5PV310: Add audio platform devices Jassi Brar
2010-10-22  8:38 ` [PATCH 17/24] ASoC: SMARTQ: Move to use new I2S driver Jassi Brar
2010-10-22  8:39 ` [PATCH 18/24] ASoC: GONI: " Jassi Brar
2010-10-22  8:39 ` [PATCH 19/24] ASoC: SMDK64XX: " Jassi Brar
2010-10-22  8:39 ` [PATCH 20/24] ASoC: S3C64XX: Remove obsoleted I2S drivers Jassi Brar
2010-10-22  8:39 ` [PATCH 21/24] ASoC: SMDK64XX: Rename for other platforms Jassi Brar
2010-10-22  8:40 ` [PATCH 22/24] ASoC: SMDK_WM8580: Enable for SMDKC100 Jassi Brar
2010-10-22  8:40 ` [PATCH 23/24] ASoC: Samsung: Generalize Kconfig symbols Jassi Brar
2010-10-23  1:43   ` Kyungmin Park
2010-10-22  8:40 ` [PATCH 24/24] ASoC: Samsung: Rename from s3c24xx to samsung Jassi Brar
2010-10-23  1:39   ` Kyungmin Park
2010-10-22 14:08 ` [PATCHv2] ASoC: Overhaul Samsung drivers Kukjin Kim
2010-10-25  2:17   ` Jassi Brar
2010-10-25  2:31     ` Kukjin Kim
2010-10-25  7:20       ` Jassi Brar

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=1287736458-11963-1-git-send-email-jassisinghbrar@gmail.com \
    --to=jassisinghbrar@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ben-linux@fluff.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