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 | 4f2e4e124c91bb5105b8ecc8928e5fc0f2b2af0f (patch) | |
tree | f85fefa437fb94d4378c3d0a875f83e73738cd2f /arch/arm/mach-s5p6442 | |
parent | d9a93c345a5503668ca2b3a75be0eba1131c90e4 (diff) |
ARM: S5P6442: 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-s5p6442')
-rw-r--r-- | arch/arm/mach-s5p6442/dev-audio.c | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/arch/arm/mach-s5p6442/dev-audio.c b/arch/arm/mach-s5p6442/dev-audio.c index d0207b7634b6..8719dc41fe32 100644 --- a/arch/arm/mach-s5p6442/dev-audio.c +++ b/arch/arm/mach-s5p6442/dev-audio.c | |||
@@ -29,7 +29,7 @@ static int s5p6442_cfg_i2s(struct platform_device *pdev) | |||
29 | base = S5P6442_GPC1(0); | 29 | base = S5P6442_GPC1(0); |
30 | break; | 30 | break; |
31 | 31 | ||
32 | case -1: | 32 | case 0: |
33 | base = S5P6442_GPC0(0); | 33 | base = S5P6442_GPC0(0); |
34 | break; | 34 | break; |
35 | 35 | ||
@@ -42,8 +42,19 @@ static int s5p6442_cfg_i2s(struct platform_device *pdev) | |||
42 | return 0; | 42 | return 0; |
43 | } | 43 | } |
44 | 44 | ||
45 | static struct s3c_audio_pdata s3c_i2s_pdata = { | 45 | static const char *rclksrc_v35[] = { |
46 | [0] = "busclk", | ||
47 | [1] = "i2sclk", | ||
48 | }; | ||
49 | |||
50 | static struct s3c_audio_pdata i2sv35_pdata = { | ||
46 | .cfg_gpio = s5p6442_cfg_i2s, | 51 | .cfg_gpio = s5p6442_cfg_i2s, |
52 | .type = { | ||
53 | .i2s = { | ||
54 | .quirks = QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR, | ||
55 | .src_clk = rclksrc_v35, | ||
56 | }, | ||
57 | }, | ||
47 | }; | 58 | }; |
48 | 59 | ||
49 | static struct resource s5p6442_iis0_resource[] = { | 60 | static struct resource s5p6442_iis0_resource[] = { |
@@ -62,15 +73,34 @@ static struct resource s5p6442_iis0_resource[] = { | |||
62 | .end = DMACH_I2S0_RX, | 73 | .end = DMACH_I2S0_RX, |
63 | .flags = IORESOURCE_DMA, | 74 | .flags = IORESOURCE_DMA, |
64 | }, | 75 | }, |
76 | [3] = { | ||
77 | .start = DMACH_I2S0S_TX, | ||
78 | .end = DMACH_I2S0S_TX, | ||
79 | .flags = IORESOURCE_DMA, | ||
80 | }, | ||
65 | }; | 81 | }; |
66 | 82 | ||
67 | struct platform_device s5p6442_device_iis0 = { | 83 | struct platform_device s5p6442_device_iis0 = { |
68 | .name = "samsung-i2s-v4", | 84 | .name = "samsung-i2s", |
69 | .id = -1, | 85 | .id = 0, |
70 | .num_resources = ARRAY_SIZE(s5p6442_iis0_resource), | 86 | .num_resources = ARRAY_SIZE(s5p6442_iis0_resource), |
71 | .resource = s5p6442_iis0_resource, | 87 | .resource = s5p6442_iis0_resource, |
72 | .dev = { | 88 | .dev = { |
73 | .platform_data = &s3c_i2s_pdata, | 89 | .platform_data = &i2sv35_pdata, |
90 | }, | ||
91 | }; | ||
92 | |||
93 | static const char *rclksrc_v3[] = { | ||
94 | [0] = "iis", | ||
95 | [1] = "sclk_audio", | ||
96 | }; | ||
97 | |||
98 | static struct s3c_audio_pdata i2sv3_pdata = { | ||
99 | .cfg_gpio = s5p6442_cfg_i2s, | ||
100 | .type = { | ||
101 | .i2s = { | ||
102 | .src_clk = rclksrc_v3, | ||
103 | }, | ||
74 | }, | 104 | }, |
75 | }; | 105 | }; |
76 | 106 | ||
@@ -98,7 +128,7 @@ struct platform_device s5p6442_device_iis1 = { | |||
98 | .num_resources = ARRAY_SIZE(s5p6442_iis1_resource), | 128 | .num_resources = ARRAY_SIZE(s5p6442_iis1_resource), |
99 | .resource = s5p6442_iis1_resource, | 129 | .resource = s5p6442_iis1_resource, |
100 | .dev = { | 130 | .dev = { |
101 | .platform_data = &s3c_i2s_pdata, | 131 | .platform_data = &i2sv3_pdata, |
102 | }, | 132 | }, |
103 | }; | 133 | }; |
104 | 134 | ||