diff options
author | Jassi Brar <jassi.brar@samsung.com> | 2010-11-18 18:49:44 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-11-18 18:49:44 -0500 |
commit | 651cba5d17564e684584e544ff9111a3cb409c94 (patch) | |
tree | e37f3280fa443b69e1265705a5895ac9ab7b2de4 /arch/arm/mach-s5pc100 | |
parent | 4f2e4e124c91bb5105b8ecc8928e5fc0f2b2af0f (diff) |
ARM: S5PC100: Upgrade platform device for I2S
Add more information to I2S platform_devices in order to
prepare them for new controller driver.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pc100')
-rw-r--r-- | arch/arm/mach-s5pc100/dev-audio.c | 50 |
1 files changed, 39 insertions, 11 deletions
diff --git a/arch/arm/mach-s5pc100/dev-audio.c b/arch/arm/mach-s5pc100/dev-audio.c index bf0c90fa4a98..10ab275ebd63 100644 --- a/arch/arm/mach-s5pc100/dev-audio.c +++ b/arch/arm/mach-s5pc100/dev-audio.c | |||
@@ -23,17 +23,14 @@ static int s5pc100_cfg_i2s(struct platform_device *pdev) | |||
23 | { | 23 | { |
24 | /* configure GPIO for i2s port */ | 24 | /* configure GPIO for i2s port */ |
25 | switch (pdev->id) { | 25 | switch (pdev->id) { |
26 | case 0: /* Dedicated pins */ | ||
27 | break; | ||
26 | case 1: | 28 | case 1: |
27 | s3c_gpio_cfgpin_range(S5PC100_GPC(0), 5, S3C_GPIO_SFN(2)); | 29 | s3c_gpio_cfgpin_range(S5PC100_GPC(0), 5, S3C_GPIO_SFN(2)); |
28 | break; | 30 | break; |
29 | |||
30 | case 2: | 31 | case 2: |
31 | s3c_gpio_cfgpin_range(S5PC100_GPG3(0), 5, S3C_GPIO_SFN(4)); | 32 | s3c_gpio_cfgpin_range(S5PC100_GPG3(0), 5, S3C_GPIO_SFN(4)); |
32 | break; | 33 | break; |
33 | |||
34 | case -1: /* Dedicated pins */ | ||
35 | break; | ||
36 | |||
37 | default: | 34 | default: |
38 | printk(KERN_ERR "Invalid Device %d\n", pdev->id); | 35 | printk(KERN_ERR "Invalid Device %d\n", pdev->id); |
39 | return -EINVAL; | 36 | return -EINVAL; |
@@ -42,8 +39,20 @@ static int s5pc100_cfg_i2s(struct platform_device *pdev) | |||
42 | return 0; | 39 | return 0; |
43 | } | 40 | } |
44 | 41 | ||
45 | static struct s3c_audio_pdata s3c_i2s_pdata = { | 42 | static const char *rclksrc_v5[] = { |
43 | [0] = "iis", | ||
44 | [1] = "i2sclkd2", | ||
45 | }; | ||
46 | |||
47 | static struct s3c_audio_pdata i2sv5_pdata = { | ||
46 | .cfg_gpio = s5pc100_cfg_i2s, | 48 | .cfg_gpio = s5pc100_cfg_i2s, |
49 | .type = { | ||
50 | .i2s = { | ||
51 | .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI | ||
52 | | QUIRK_NEED_RSTCLR, | ||
53 | .src_clk = rclksrc_v5, | ||
54 | }, | ||
55 | }, | ||
47 | }; | 56 | }; |
48 | 57 | ||
49 | static struct resource s5pc100_iis0_resource[] = { | 58 | static struct resource s5pc100_iis0_resource[] = { |
@@ -62,15 +71,34 @@ static struct resource s5pc100_iis0_resource[] = { | |||
62 | .end = DMACH_I2S0_RX, | 71 | .end = DMACH_I2S0_RX, |
63 | .flags = IORESOURCE_DMA, | 72 | .flags = IORESOURCE_DMA, |
64 | }, | 73 | }, |
74 | [3] = { | ||
75 | .start = DMACH_I2S0S_TX, | ||
76 | .end = DMACH_I2S0S_TX, | ||
77 | .flags = IORESOURCE_DMA, | ||
78 | }, | ||
65 | }; | 79 | }; |
66 | 80 | ||
67 | struct platform_device s5pc100_device_iis0 = { | 81 | struct platform_device s5pc100_device_iis0 = { |
68 | .name = "samsung-i2s-v4", | 82 | .name = "samsung-i2s", |
69 | .id = -1, | 83 | .id = 0, |
70 | .num_resources = ARRAY_SIZE(s5pc100_iis0_resource), | 84 | .num_resources = ARRAY_SIZE(s5pc100_iis0_resource), |
71 | .resource = s5pc100_iis0_resource, | 85 | .resource = s5pc100_iis0_resource, |
72 | .dev = { | 86 | .dev = { |
73 | .platform_data = &s3c_i2s_pdata, | 87 | .platform_data = &i2sv5_pdata, |
88 | }, | ||
89 | }; | ||
90 | |||
91 | static const char *rclksrc_v3[] = { | ||
92 | [0] = "iis", | ||
93 | [1] = "sclk_audio", | ||
94 | }; | ||
95 | |||
96 | static struct s3c_audio_pdata i2sv3_pdata = { | ||
97 | .cfg_gpio = s5pc100_cfg_i2s, | ||
98 | .type = { | ||
99 | .i2s = { | ||
100 | .src_clk = rclksrc_v3, | ||
101 | }, | ||
74 | }, | 102 | }, |
75 | }; | 103 | }; |
76 | 104 | ||
@@ -98,7 +126,7 @@ struct platform_device s5pc100_device_iis1 = { | |||
98 | .num_resources = ARRAY_SIZE(s5pc100_iis1_resource), | 126 | .num_resources = ARRAY_SIZE(s5pc100_iis1_resource), |
99 | .resource = s5pc100_iis1_resource, | 127 | .resource = s5pc100_iis1_resource, |
100 | .dev = { | 128 | .dev = { |
101 | .platform_data = &s3c_i2s_pdata, | 129 | .platform_data = &i2sv3_pdata, |
102 | }, | 130 | }, |
103 | }; | 131 | }; |
104 | 132 | ||
@@ -126,7 +154,7 @@ struct platform_device s5pc100_device_iis2 = { | |||
126 | .num_resources = ARRAY_SIZE(s5pc100_iis2_resource), | 154 | .num_resources = ARRAY_SIZE(s5pc100_iis2_resource), |
127 | .resource = s5pc100_iis2_resource, | 155 | .resource = s5pc100_iis2_resource, |
128 | .dev = { | 156 | .dev = { |
129 | .platform_data = &s3c_i2s_pdata, | 157 | .platform_data = &i2sv3_pdata, |
130 | }, | 158 | }, |
131 | }; | 159 | }; |
132 | 160 | ||