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 | d9a93c345a5503668ca2b3a75be0eba1131c90e4 (patch) | |
tree | 93df188933c3fa8525e03d3b13461a98df8e1b78 | |
parent | 6a62bee2105250ac02bf3c96b7f35e28dac36888 (diff) |
ARM: S5P64X0: Upgrade platform device for I2S
Add more information to I2S platform_devices in order
to prepare them for new controller driver.
Also, discard duplicated gpio-cfg.
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>
-rw-r--r-- | arch/arm/mach-s5p64x0/clock-s5p6440.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5p64x0/clock-s5p6450.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5p64x0/dev-audio.c | 55 |
3 files changed, 23 insertions, 36 deletions
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6440.c b/arch/arm/mach-s5p64x0/clock-s5p6440.c index e4883dc1c8d7..409c5fc3670d 100644 --- a/arch/arm/mach-s5p64x0/clock-s5p6440.c +++ b/arch/arm/mach-s5p64x0/clock-s5p6440.c | |||
@@ -261,7 +261,7 @@ static struct clk init_clocks_disable[] = { | |||
261 | .enable = s5p64x0_pclk_ctrl, | 261 | .enable = s5p64x0_pclk_ctrl, |
262 | .ctrlbit = (1 << 25), | 262 | .ctrlbit = (1 << 25), |
263 | }, { | 263 | }, { |
264 | .name = "i2s_v40", | 264 | .name = "iis", |
265 | .id = 0, | 265 | .id = 0, |
266 | .parent = &clk_pclk_low.clk, | 266 | .parent = &clk_pclk_low.clk, |
267 | .enable = s5p64x0_pclk_ctrl, | 267 | .enable = s5p64x0_pclk_ctrl, |
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6450.c b/arch/arm/mach-s5p64x0/clock-s5p6450.c index 7dbf3c968f53..7fc6abd35914 100644 --- a/arch/arm/mach-s5p64x0/clock-s5p6450.c +++ b/arch/arm/mach-s5p64x0/clock-s5p6450.c | |||
@@ -256,7 +256,7 @@ static struct clk init_clocks_disable[] = { | |||
256 | .ctrlbit = (1 << 22), | 256 | .ctrlbit = (1 << 22), |
257 | }, { | 257 | }, { |
258 | .name = "iis", | 258 | .name = "iis", |
259 | .id = -1, | 259 | .id = 0, |
260 | .parent = &clk_pclk_low.clk, | 260 | .parent = &clk_pclk_low.clk, |
261 | .enable = s5p64x0_pclk_ctrl, | 261 | .enable = s5p64x0_pclk_ctrl, |
262 | .ctrlbit = (1 << 26), | 262 | .ctrlbit = (1 << 26), |
diff --git a/arch/arm/mach-s5p64x0/dev-audio.c b/arch/arm/mach-s5p64x0/dev-audio.c index fb613d0f3808..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 = "samsung-i2s-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 = "samsung-i2s-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 | ||