diff options
author | Seungwhan Youn <sw.youn@samsung.com> | 2010-10-14 03:35:24 +0200 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-25 09:05:34 +0200 |
commit | 494edadd6290f6e5d36985e9d04a84ec92d2cea1 (patch) | |
tree | 5196accc554a6da031d7b6459b91ee44b49926fc /arch/arm/mach-s5pv210/dev-audio.c | |
parent | ARM: S5PC100: Add SCLK_SPDIF clock (diff) | |
download | linux-494edadd6290f6e5d36985e9d04a84ec92d2cea1.tar.xz linux-494edadd6290f6e5d36985e9d04a84ec92d2cea1.zip |
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.c | 40 |
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 b274b6be7bd5..1303fcb12b51 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), + }, +}; |