diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-01-13 02:37:24 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-01-13 02:37:24 -0500 |
commit | 6db9a0f326d3144d790d9479309df480a8f562e4 (patch) | |
tree | 650a8950c35c087278ecee1b8d123f75f601ebc8 /arch/arm/mach-s5p64x0/dev-audio.c | |
parent | c400c9e23feb5bb3fbe8a8d4581ecce3b19a2f38 (diff) | |
parent | 18b022eb117e7f70c191267551ff865f278a9258 (diff) |
Merge branch 'topic/asoc' into for-linus
Diffstat (limited to 'arch/arm/mach-s5p64x0/dev-audio.c')
-rw-r--r-- | arch/arm/mach-s5p64x0/dev-audio.c | 55 |
1 files changed, 21 insertions, 34 deletions
diff --git a/arch/arm/mach-s5p64x0/dev-audio.c b/arch/arm/mach-s5p64x0/dev-audio.c index 396bacc0a39a..14f89e73b8de 100644 --- a/arch/arm/mach-s5p64x0/dev-audio.c +++ b/arch/arm/mach-s5p64x0/dev-audio.c | |||
@@ -19,15 +19,19 @@ | |||
19 | #include <mach/dma.h> | 19 | #include <mach/dma.h> |
20 | #include <mach/irqs.h> | 20 | #include <mach/irqs.h> |
21 | 21 | ||
22 | static int s5p6440_cfg_i2s(struct platform_device *pdev) | 22 | static const char *rclksrc[] = { |
23 | [0] = "iis", | ||
24 | [1] = "sclk_audio2", | ||
25 | }; | ||
26 | |||
27 | static int s5p64x0_cfg_i2s(struct platform_device *pdev) | ||
23 | { | 28 | { |
24 | /* configure GPIO for i2s port */ | 29 | /* configure GPIO for i2s port */ |
25 | switch (pdev->id) { | 30 | switch (pdev->id) { |
26 | case -1: | 31 | case 0: |
27 | s3c_gpio_cfgpin_range(S5P6440_GPR(4), 5, S3C_GPIO_SFN(5)); | 32 | s3c_gpio_cfgpin_range(S5P6440_GPR(4), 5, S3C_GPIO_SFN(5)); |
28 | s3c_gpio_cfgpin_range(S5P6440_GPR(13), 2, S3C_GPIO_SFN(5)); | 33 | s3c_gpio_cfgpin_range(S5P6440_GPR(13), 2, S3C_GPIO_SFN(5)); |
29 | break; | 34 | break; |
30 | |||
31 | default: | 35 | default: |
32 | printk(KERN_ERR "Invalid Device %d\n", pdev->id); | 36 | printk(KERN_ERR "Invalid Device %d\n", pdev->id); |
33 | return -EINVAL; | 37 | return -EINVAL; |
@@ -36,31 +40,14 @@ static int s5p6440_cfg_i2s(struct platform_device *pdev) | |||
36 | return 0; | 40 | return 0; |
37 | } | 41 | } |
38 | 42 | ||
39 | static int s5p6450_cfg_i2s(struct platform_device *pdev) | 43 | static struct s3c_audio_pdata s5p64x0_i2s_pdata = { |
40 | { | 44 | .cfg_gpio = s5p64x0_cfg_i2s, |
41 | /* configure GPIO for i2s port */ | 45 | .type = { |
42 | switch (pdev->id) { | 46 | .i2s = { |
43 | case -1: | 47 | .quirks = QUIRK_PRI_6CHAN, |
44 | s3c_gpio_cfgpin(S5P6450_GPB(4), S3C_GPIO_SFN(5)); | 48 | .src_clk = rclksrc, |
45 | s3c_gpio_cfgpin_range(S5P6450_GPR(4), 5, S3C_GPIO_SFN(5)); | 49 | }, |
46 | s3c_gpio_cfgpin_range(S5P6450_GPR(13), 2, S3C_GPIO_SFN(5)); | 50 | }, |
47 | |||
48 | break; | ||
49 | |||
50 | default: | ||
51 | printk(KERN_ERR "Invalid Device %d\n", pdev->id); | ||
52 | return -EINVAL; | ||
53 | } | ||
54 | |||
55 | return 0; | ||
56 | } | ||
57 | |||
58 | static struct s3c_audio_pdata s5p6440_i2s_pdata = { | ||
59 | .cfg_gpio = s5p6440_cfg_i2s, | ||
60 | }; | ||
61 | |||
62 | static struct s3c_audio_pdata s5p6450_i2s_pdata = { | ||
63 | .cfg_gpio = s5p6450_cfg_i2s, | ||
64 | }; | 51 | }; |
65 | 52 | ||
66 | static struct resource s5p64x0_iis0_resource[] = { | 53 | static struct resource s5p64x0_iis0_resource[] = { |
@@ -82,22 +69,22 @@ static struct resource s5p64x0_iis0_resource[] = { | |||
82 | }; | 69 | }; |
83 | 70 | ||
84 | struct platform_device s5p6440_device_iis = { | 71 | struct platform_device s5p6440_device_iis = { |
85 | .name = "s3c64xx-iis-v4", | 72 | .name = "samsung-i2s", |
86 | .id = -1, | 73 | .id = 0, |
87 | .num_resources = ARRAY_SIZE(s5p64x0_iis0_resource), | 74 | .num_resources = ARRAY_SIZE(s5p64x0_iis0_resource), |
88 | .resource = s5p64x0_iis0_resource, | 75 | .resource = s5p64x0_iis0_resource, |
89 | .dev = { | 76 | .dev = { |
90 | .platform_data = &s5p6440_i2s_pdata, | 77 | .platform_data = &s5p64x0_i2s_pdata, |
91 | }, | 78 | }, |
92 | }; | 79 | }; |
93 | 80 | ||
94 | struct platform_device s5p6450_device_iis0 = { | 81 | struct platform_device s5p6450_device_iis0 = { |
95 | .name = "s3c64xx-iis-v4", | 82 | .name = "samsung-i2s", |
96 | .id = -1, | 83 | .id = 0, |
97 | .num_resources = ARRAY_SIZE(s5p64x0_iis0_resource), | 84 | .num_resources = ARRAY_SIZE(s5p64x0_iis0_resource), |
98 | .resource = s5p64x0_iis0_resource, | 85 | .resource = s5p64x0_iis0_resource, |
99 | .dev = { | 86 | .dev = { |
100 | .platform_data = &s5p6450_i2s_pdata, | 87 | .platform_data = &s5p64x0_i2s_pdata, |
101 | }, | 88 | }, |
102 | }; | 89 | }; |
103 | 90 | ||