diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2010-12-21 23:11:38 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-12-21 23:11:38 -0500 |
commit | ce8aceae842bceaa4d74a9122208576e5a00c9a3 (patch) | |
tree | 701bf9498647ebd4ae210d8f5f698e68bc9a8d71 /arch/arm/mach-s3c64xx | |
parent | 90a8a73c06cc32b609a880d48449d7083327e11a (diff) | |
parent | 460ed699f4c943e1ec4a8458869eb532fe31fd16 (diff) |
Merge branch 'next-samsung-asoc' into next-samsung-asoc2
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r-- | arch/arm/mach-s3c64xx/clock.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/dev-audio.c | 60 |
2 files changed, 35 insertions, 27 deletions
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c index 7e03f0ae2fc8..1c98d2ff2ed6 100644 --- a/arch/arm/mach-s3c64xx/clock.c +++ b/arch/arm/mach-s3c64xx/clock.c | |||
@@ -695,7 +695,7 @@ static struct clksrc_clk clksrcs[] = { | |||
695 | }, { | 695 | }, { |
696 | .clk = { | 696 | .clk = { |
697 | .name = "audio-bus", | 697 | .name = "audio-bus", |
698 | .id = -1, /* There's only one IISv4 port */ | 698 | .id = 2, |
699 | .ctrlbit = S3C6410_CLKCON_SCLK_AUDIO2, | 699 | .ctrlbit = S3C6410_CLKCON_SCLK_AUDIO2, |
700 | .enable = s3c64xx_sclk_ctrl, | 700 | .enable = s3c64xx_sclk_ctrl, |
701 | }, | 701 | }, |
diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c index 76426a32c013..7618627b98f5 100644 --- a/arch/arm/mach-s3c64xx/dev-audio.c +++ b/arch/arm/mach-s3c64xx/dev-audio.c | |||
@@ -22,7 +22,12 @@ | |||
22 | #include <plat/audio.h> | 22 | #include <plat/audio.h> |
23 | #include <plat/gpio-cfg.h> | 23 | #include <plat/gpio-cfg.h> |
24 | 24 | ||
25 | static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev) | 25 | static const char *rclksrc[] = { |
26 | [0] = "iis", | ||
27 | [1] = "audio-bus", | ||
28 | }; | ||
29 | |||
30 | static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev) | ||
26 | { | 31 | { |
27 | unsigned int base; | 32 | unsigned int base; |
28 | 33 | ||
@@ -33,6 +38,12 @@ static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev) | |||
33 | case 1: | 38 | case 1: |
34 | base = S3C64XX_GPE(0); | 39 | base = S3C64XX_GPE(0); |
35 | break; | 40 | break; |
41 | case 2: | ||
42 | s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C_GPIO_SFN(5)); | ||
43 | s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C_GPIO_SFN(5)); | ||
44 | s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C_GPIO_SFN(5)); | ||
45 | s3c_gpio_cfgpin_range(S3C64XX_GPH(6), 4, S3C_GPIO_SFN(5)); | ||
46 | return 0; | ||
36 | default: | 47 | default: |
37 | printk(KERN_DEBUG "Invalid I2S Controller number: %d\n", | 48 | printk(KERN_DEBUG "Invalid I2S Controller number: %d\n", |
38 | pdev->id); | 49 | pdev->id); |
@@ -44,16 +55,6 @@ static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev) | |||
44 | return 0; | 55 | return 0; |
45 | } | 56 | } |
46 | 57 | ||
47 | static int s3c64xx_i2sv4_cfg_gpio(struct platform_device *pdev) | ||
48 | { | ||
49 | s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C_GPIO_SFN(5)); | ||
50 | s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C_GPIO_SFN(5)); | ||
51 | s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C_GPIO_SFN(5)); | ||
52 | s3c_gpio_cfgpin_range(S3C64XX_GPH(6), 4, S3C_GPIO_SFN(5)); | ||
53 | |||
54 | return 0; | ||
55 | } | ||
56 | |||
57 | static struct resource s3c64xx_iis0_resource[] = { | 58 | static struct resource s3c64xx_iis0_resource[] = { |
58 | [0] = { | 59 | [0] = { |
59 | .start = S3C64XX_PA_IIS0, | 60 | .start = S3C64XX_PA_IIS0, |
@@ -72,17 +73,22 @@ static struct resource s3c64xx_iis0_resource[] = { | |||
72 | }, | 73 | }, |
73 | }; | 74 | }; |
74 | 75 | ||
75 | static struct s3c_audio_pdata s3c_i2s0_pdata = { | 76 | static struct s3c_audio_pdata i2sv3_pdata = { |
76 | .cfg_gpio = s3c64xx_i2sv3_cfg_gpio, | 77 | .cfg_gpio = s3c64xx_i2s_cfg_gpio, |
78 | .type = { | ||
79 | .i2s = { | ||
80 | .src_clk = rclksrc, | ||
81 | }, | ||
82 | }, | ||
77 | }; | 83 | }; |
78 | 84 | ||
79 | struct platform_device s3c64xx_device_iis0 = { | 85 | struct platform_device s3c64xx_device_iis0 = { |
80 | .name = "s3c64xx-iis", | 86 | .name = "samsung-i2s", |
81 | .id = 0, | 87 | .id = 0, |
82 | .num_resources = ARRAY_SIZE(s3c64xx_iis0_resource), | 88 | .num_resources = ARRAY_SIZE(s3c64xx_iis0_resource), |
83 | .resource = s3c64xx_iis0_resource, | 89 | .resource = s3c64xx_iis0_resource, |
84 | .dev = { | 90 | .dev = { |
85 | .platform_data = &s3c_i2s0_pdata, | 91 | .platform_data = &i2sv3_pdata, |
86 | }, | 92 | }, |
87 | }; | 93 | }; |
88 | EXPORT_SYMBOL(s3c64xx_device_iis0); | 94 | EXPORT_SYMBOL(s3c64xx_device_iis0); |
@@ -105,17 +111,13 @@ static struct resource s3c64xx_iis1_resource[] = { | |||
105 | }, | 111 | }, |
106 | }; | 112 | }; |
107 | 113 | ||
108 | static struct s3c_audio_pdata s3c_i2s1_pdata = { | ||
109 | .cfg_gpio = s3c64xx_i2sv3_cfg_gpio, | ||
110 | }; | ||
111 | |||
112 | struct platform_device s3c64xx_device_iis1 = { | 114 | struct platform_device s3c64xx_device_iis1 = { |
113 | .name = "s3c64xx-iis", | 115 | .name = "samsung-i2s", |
114 | .id = 1, | 116 | .id = 1, |
115 | .num_resources = ARRAY_SIZE(s3c64xx_iis1_resource), | 117 | .num_resources = ARRAY_SIZE(s3c64xx_iis1_resource), |
116 | .resource = s3c64xx_iis1_resource, | 118 | .resource = s3c64xx_iis1_resource, |
117 | .dev = { | 119 | .dev = { |
118 | .platform_data = &s3c_i2s1_pdata, | 120 | .platform_data = &i2sv3_pdata, |
119 | }, | 121 | }, |
120 | }; | 122 | }; |
121 | EXPORT_SYMBOL(s3c64xx_device_iis1); | 123 | EXPORT_SYMBOL(s3c64xx_device_iis1); |
@@ -138,17 +140,23 @@ static struct resource s3c64xx_iisv4_resource[] = { | |||
138 | }, | 140 | }, |
139 | }; | 141 | }; |
140 | 142 | ||
141 | static struct s3c_audio_pdata s3c_i2sv4_pdata = { | 143 | static struct s3c_audio_pdata i2sv4_pdata = { |
142 | .cfg_gpio = s3c64xx_i2sv4_cfg_gpio, | 144 | .cfg_gpio = s3c64xx_i2s_cfg_gpio, |
145 | .type = { | ||
146 | .i2s = { | ||
147 | .quirks = QUIRK_PRI_6CHAN, | ||
148 | .src_clk = rclksrc, | ||
149 | }, | ||
150 | }, | ||
143 | }; | 151 | }; |
144 | 152 | ||
145 | struct platform_device s3c64xx_device_iisv4 = { | 153 | struct platform_device s3c64xx_device_iisv4 = { |
146 | .name = "s3c64xx-iis-v4", | 154 | .name = "samsung-i2s", |
147 | .id = -1, | 155 | .id = 2, |
148 | .num_resources = ARRAY_SIZE(s3c64xx_iisv4_resource), | 156 | .num_resources = ARRAY_SIZE(s3c64xx_iisv4_resource), |
149 | .resource = s3c64xx_iisv4_resource, | 157 | .resource = s3c64xx_iisv4_resource, |
150 | .dev = { | 158 | .dev = { |
151 | .platform_data = &s3c_i2sv4_pdata, | 159 | .platform_data = &i2sv4_pdata, |
152 | }, | 160 | }, |
153 | }; | 161 | }; |
154 | EXPORT_SYMBOL(s3c64xx_device_iisv4); | 162 | EXPORT_SYMBOL(s3c64xx_device_iisv4); |