summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv210/dev-audio.c
diff options
context:
space:
mode:
authorSeungwhan Youn <sw.youn@samsung.com>2010-10-14 10:35:24 +0900
committerKukjin Kim <kgene.kim@samsung.com>2010-10-25 16:05:34 +0900
commit494edadd6290f6e5d36985e9d04a84ec92d2cea1 (patch)
tree5196accc554a6da031d7b6459b91ee44b49926fc /arch/arm/mach-s5pv210/dev-audio.c
parent04a4fd0ae2c58943a7435de879b9714c96a1e96a (diff)
downloadop-kernel-dev-494edadd6290f6e5d36985e9d04a84ec92d2cea1.zip
op-kernel-dev-494edadd6290f6e5d36985e9d04a84ec92d2cea1.tar.gz
ARM: S5PV210: Add S/PDIF platform device
This patch add S/PDIF platform device to support S/PDIF PCM audio on S5PV210. Signed-off-by: Seungwhan Youn <sw.youn@samsung.com> Acked-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210/dev-audio.c')
-rw-r--r--arch/arm/mach-s5pv210/dev-audio.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/dev-audio.c b/arch/arm/mach-s5pv210/dev-audio.c
index b274b6b..1303fcb 100644
--- a/arch/arm/mach-s5pv210/dev-audio.c
+++ b/arch/arm/mach-s5pv210/dev-audio.c
@@ -293,3 +293,43 @@ struct platform_device s5pv210_device_ac97 = {
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
+
+/* S/PDIF Controller platform_device */
+
+static int s5pv210_spdif_cfg_gpio(struct platform_device *pdev)
+{
+ s3c_gpio_cfgpin_range(S5PV210_GPC1(0), 2, S3C_GPIO_SFN(3));
+
+ return 0;
+}
+
+static struct resource s5pv210_spdif_resource[] = {
+ [0] = {
+ .start = S5PV210_PA_SPDIF,
+ .end = S5PV210_PA_SPDIF + 0x100 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = DMACH_SPDIF,
+ .end = DMACH_SPDIF,
+ .flags = IORESOURCE_DMA,
+ },
+};
+
+static struct s3c_audio_pdata samsung_spdif_pdata = {
+ .cfg_gpio = s5pv210_spdif_cfg_gpio,
+};
+
+static u64 s5pv210_spdif_dmamask = DMA_BIT_MASK(32);
+
+struct platform_device s5pv210_device_spdif = {
+ .name = "samsung-spdif",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(s5pv210_spdif_resource),
+ .resource = s5pv210_spdif_resource,
+ .dev = {
+ .platform_data = &samsung_spdif_pdata,
+ .dma_mask = &s5pv210_spdif_dmamask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ },
+};
OpenPOWER on IntegriCloud