aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorSeungwhan Youn <sw.youn@samsung.com>2010-10-13 21:35:24 -0400
committerKukjin Kim <kgene.kim@samsung.com>2010-10-25 03:05:34 -0400
commit494edadd6290f6e5d36985e9d04a84ec92d2cea1 (patch)
tree5196accc554a6da031d7b6459b91ee44b49926fc /arch/arm
parent04a4fd0ae2c58943a7435de879b9714c96a1e96a (diff)
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')
-rw-r--r--arch/arm/mach-s5pv210/dev-audio.c40
-rw-r--r--arch/arm/mach-s5pv210/include/mach/map.h3
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkc110.c1
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkv210.c1
-rw-r--r--arch/arm/plat-samsung/include/plat/devs.h1
5 files changed, 46 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 = {
293 .coherent_dma_mask = DMA_BIT_MASK(32), 293 .coherent_dma_mask = DMA_BIT_MASK(32),
294 }, 294 },
295}; 295};
296
297/* S/PDIF Controller platform_device */
298
299static int s5pv210_spdif_cfg_gpio(struct platform_device *pdev)
300{
301 s3c_gpio_cfgpin_range(S5PV210_GPC1(0), 2, S3C_GPIO_SFN(3));
302
303 return 0;
304}
305
306static struct resource s5pv210_spdif_resource[] = {
307 [0] = {
308 .start = S5PV210_PA_SPDIF,
309 .end = S5PV210_PA_SPDIF + 0x100 - 1,
310 .flags = IORESOURCE_MEM,
311 },
312 [1] = {
313 .start = DMACH_SPDIF,
314 .end = DMACH_SPDIF,
315 .flags = IORESOURCE_DMA,
316 },
317};
318
319static struct s3c_audio_pdata samsung_spdif_pdata = {
320 .cfg_gpio = s5pv210_spdif_cfg_gpio,
321};
322
323static u64 s5pv210_spdif_dmamask = DMA_BIT_MASK(32);
324
325struct platform_device s5pv210_device_spdif = {
326 .name = "samsung-spdif",
327 .id = -1,
328 .num_resources = ARRAY_SIZE(s5pv210_spdif_resource),
329 .resource = s5pv210_spdif_resource,
330 .dev = {
331 .platform_data = &samsung_spdif_pdata,
332 .dma_mask = &s5pv210_spdif_dmamask,
333 .coherent_dma_mask = DMA_BIT_MASK(32),
334 },
335};
diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-s5pv210/include/mach/map.h
index 0e24ba14cd26..861d7fe11fc9 100644
--- a/arch/arm/mach-s5pv210/include/mach/map.h
+++ b/arch/arm/mach-s5pv210/include/mach/map.h
@@ -86,6 +86,9 @@
86#define S5PV210_PA_SDRAM (0x20000000) 86#define S5PV210_PA_SDRAM (0x20000000)
87#define S5P_PA_SDRAM S5PV210_PA_SDRAM 87#define S5P_PA_SDRAM S5PV210_PA_SDRAM
88 88
89/* S/PDIF */
90#define S5PV210_PA_SPDIF 0xE1100000
91
89/* I2S */ 92/* I2S */
90#define S5PV210_PA_IIS0 0xEEE30000 93#define S5PV210_PA_IIS0 0xEEE30000
91#define S5PV210_PA_IIS1 0xE2100000 94#define S5PV210_PA_IIS1 0xE2100000
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c
index 053b50ddcfaa..19b532432da2 100644
--- a/arch/arm/mach-s5pv210/mach-smdkc110.c
+++ b/arch/arm/mach-s5pv210/mach-smdkc110.c
@@ -82,6 +82,7 @@ static struct s3c_ide_platdata smdkc110_ide_pdata __initdata = {
82static struct platform_device *smdkc110_devices[] __initdata = { 82static struct platform_device *smdkc110_devices[] __initdata = {
83 &s5pv210_device_iis0, 83 &s5pv210_device_iis0,
84 &s5pv210_device_ac97, 84 &s5pv210_device_ac97,
85 &s5pv210_device_spdif,
85 &s3c_device_cfcon, 86 &s3c_device_cfcon,
86 &s3c_device_i2c0, 87 &s3c_device_i2c0,
87 &s3c_device_i2c1, 88 &s3c_device_i2c1,
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index 5a9c79cb63bd..ad5f7ea46817 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -104,6 +104,7 @@ static struct samsung_keypad_platdata smdkv210_keypad_data __initdata = {
104static struct platform_device *smdkv210_devices[] __initdata = { 104static struct platform_device *smdkv210_devices[] __initdata = {
105 &s5pv210_device_iis0, 105 &s5pv210_device_iis0,
106 &s5pv210_device_ac97, 106 &s5pv210_device_ac97,
107 &s5pv210_device_spdif,
107 &s3c_device_adc, 108 &s3c_device_adc,
108 &s3c_device_cfcon, 109 &s3c_device_cfcon,
109 &s3c_device_hsmmc0, 110 &s3c_device_hsmmc0,
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h
index 547110da1109..16521cc12532 100644
--- a/arch/arm/plat-samsung/include/plat/devs.h
+++ b/arch/arm/plat-samsung/include/plat/devs.h
@@ -92,6 +92,7 @@ extern struct platform_device s5pv210_device_pcm2;
92extern struct platform_device s5pv210_device_iis0; 92extern struct platform_device s5pv210_device_iis0;
93extern struct platform_device s5pv210_device_iis1; 93extern struct platform_device s5pv210_device_iis1;
94extern struct platform_device s5pv210_device_iis2; 94extern struct platform_device s5pv210_device_iis2;
95extern struct platform_device s5pv210_device_spdif;
95 96
96extern struct platform_device s5p6442_device_pcm0; 97extern struct platform_device s5p6442_device_pcm0;
97extern struct platform_device s5p6442_device_pcm1; 98extern struct platform_device s5p6442_device_pcm1;