diff options
author | Jarkko Nikula <jarkko.nikula@nokia.com> | 2008-10-08 03:01:40 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-10-08 03:01:40 -0400 |
commit | 05228c35c67995c745ae3c768eaf90740c643fa9 (patch) | |
tree | cf7d049af72e10fb5c9b317bba528fa0155ae86b /arch/arm/mach-omap2/mcbsp.c | |
parent | 9c8e3a0fac67d24bbc60ccb3920b6a9150e798bc (diff) |
ARM: OMAP: Add support for OMAP2430 in McBSP
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/mcbsp.c')
-rw-r--r-- | arch/arm/mach-omap2/mcbsp.c | 79 |
1 files changed, 69 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index b4fe0f3714c0..cae3ebe249b3 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -145,8 +145,8 @@ static struct omap_mcbsp_ops omap2_mcbsp_ops = { | |||
145 | .request = omap2_mcbsp_request, | 145 | .request = omap2_mcbsp_request, |
146 | }; | 146 | }; |
147 | 147 | ||
148 | #ifdef CONFIG_ARCH_OMAP24XX | 148 | #ifdef CONFIG_ARCH_OMAP2420 |
149 | static struct omap_mcbsp_platform_data omap24xx_mcbsp_pdata[] = { | 149 | static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = { |
150 | { | 150 | { |
151 | .phys_base = OMAP24XX_MCBSP1_BASE, | 151 | .phys_base = OMAP24XX_MCBSP1_BASE, |
152 | .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX, | 152 | .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX, |
@@ -166,10 +166,64 @@ static struct omap_mcbsp_platform_data omap24xx_mcbsp_pdata[] = { | |||
166 | .clk_name = "mcbsp_clk", | 166 | .clk_name = "mcbsp_clk", |
167 | }, | 167 | }, |
168 | }; | 168 | }; |
169 | #define OMAP24XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap24xx_mcbsp_pdata) | 169 | #define OMAP2420_MCBSP_PDATA_SZ ARRAY_SIZE(omap2420_mcbsp_pdata) |
170 | #else | 170 | #else |
171 | #define omap24xx_mcbsp_pdata NULL | 171 | #define omap2420_mcbsp_pdata NULL |
172 | #define OMAP24XX_MCBSP_PDATA_SZ 0 | 172 | #define OMAP2420_MCBSP_PDATA_SZ 0 |
173 | #endif | ||
174 | |||
175 | #ifdef CONFIG_ARCH_OMAP2430 | ||
176 | static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { | ||
177 | { | ||
178 | .phys_base = OMAP24XX_MCBSP1_BASE, | ||
179 | .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX, | ||
180 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, | ||
181 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, | ||
182 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, | ||
183 | .ops = &omap2_mcbsp_ops, | ||
184 | .clk_name = "mcbsp_clk", | ||
185 | }, | ||
186 | { | ||
187 | .phys_base = OMAP24XX_MCBSP2_BASE, | ||
188 | .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX, | ||
189 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, | ||
190 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, | ||
191 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, | ||
192 | .ops = &omap2_mcbsp_ops, | ||
193 | .clk_name = "mcbsp_clk", | ||
194 | }, | ||
195 | { | ||
196 | .phys_base = OMAP2430_MCBSP3_BASE, | ||
197 | .dma_rx_sync = OMAP24XX_DMA_MCBSP3_RX, | ||
198 | .dma_tx_sync = OMAP24XX_DMA_MCBSP3_TX, | ||
199 | .rx_irq = INT_24XX_MCBSP3_IRQ_RX, | ||
200 | .tx_irq = INT_24XX_MCBSP3_IRQ_TX, | ||
201 | .ops = &omap2_mcbsp_ops, | ||
202 | .clk_name = "mcbsp_clk", | ||
203 | }, | ||
204 | { | ||
205 | .phys_base = OMAP2430_MCBSP4_BASE, | ||
206 | .dma_rx_sync = OMAP24XX_DMA_MCBSP4_RX, | ||
207 | .dma_tx_sync = OMAP24XX_DMA_MCBSP4_TX, | ||
208 | .rx_irq = INT_24XX_MCBSP4_IRQ_RX, | ||
209 | .tx_irq = INT_24XX_MCBSP4_IRQ_TX, | ||
210 | .ops = &omap2_mcbsp_ops, | ||
211 | .clk_name = "mcbsp_clk", | ||
212 | }, | ||
213 | { | ||
214 | .phys_base = OMAP2430_MCBSP5_BASE, | ||
215 | .dma_rx_sync = OMAP24XX_DMA_MCBSP5_RX, | ||
216 | .dma_tx_sync = OMAP24XX_DMA_MCBSP5_TX, | ||
217 | .rx_irq = INT_24XX_MCBSP5_IRQ_RX, | ||
218 | .tx_irq = INT_24XX_MCBSP5_IRQ_TX, | ||
219 | .ops = &omap2_mcbsp_ops, | ||
220 | .clk_name = "mcbsp_clk", | ||
221 | }, | ||
222 | }; | ||
223 | #define OMAP2430_MCBSP_PDATA_SZ ARRAY_SIZE(omap2430_mcbsp_pdata) | ||
224 | #else | ||
225 | #define omap2430_mcbsp_pdata NULL | ||
226 | #define OMAP2430_MCBSP_PDATA_SZ 0 | ||
173 | #endif | 227 | #endif |
174 | 228 | ||
175 | #ifdef CONFIG_ARCH_OMAP34XX | 229 | #ifdef CONFIG_ARCH_OMAP34XX |
@@ -236,8 +290,10 @@ static int __init omap2_mcbsp_init(void) | |||
236 | clk_register(&omap_mcbsp_clks[i].clk); | 290 | clk_register(&omap_mcbsp_clks[i].clk); |
237 | } | 291 | } |
238 | 292 | ||
239 | if (cpu_is_omap24xx()) | 293 | if (cpu_is_omap2420()) |
240 | omap_mcbsp_count = OMAP24XX_MCBSP_PDATA_SZ; | 294 | omap_mcbsp_count = OMAP2420_MCBSP_PDATA_SZ; |
295 | if (cpu_is_omap2430()) | ||
296 | omap_mcbsp_count = OMAP2430_MCBSP_PDATA_SZ; | ||
241 | if (cpu_is_omap34xx()) | 297 | if (cpu_is_omap34xx()) |
242 | omap_mcbsp_count = OMAP34XX_MCBSP_PDATA_SZ; | 298 | omap_mcbsp_count = OMAP34XX_MCBSP_PDATA_SZ; |
243 | 299 | ||
@@ -246,9 +302,12 @@ static int __init omap2_mcbsp_init(void) | |||
246 | if (!mcbsp_ptr) | 302 | if (!mcbsp_ptr) |
247 | return -ENOMEM; | 303 | return -ENOMEM; |
248 | 304 | ||
249 | if (cpu_is_omap24xx()) | 305 | if (cpu_is_omap2420()) |
250 | omap_mcbsp_register_board_cfg(omap24xx_mcbsp_pdata, | 306 | omap_mcbsp_register_board_cfg(omap2420_mcbsp_pdata, |
251 | OMAP24XX_MCBSP_PDATA_SZ); | 307 | OMAP2420_MCBSP_PDATA_SZ); |
308 | if (cpu_is_omap2430()) | ||
309 | omap_mcbsp_register_board_cfg(omap2430_mcbsp_pdata, | ||
310 | OMAP2430_MCBSP_PDATA_SZ); | ||
252 | if (cpu_is_omap34xx()) | 311 | if (cpu_is_omap34xx()) |
253 | omap_mcbsp_register_board_cfg(omap34xx_mcbsp_pdata, | 312 | omap_mcbsp_register_board_cfg(omap34xx_mcbsp_pdata, |
254 | OMAP34XX_MCBSP_PDATA_SZ); | 313 | OMAP34XX_MCBSP_PDATA_SZ); |