diff options
author | Chandra Shekhar <x0044955@ti.com> | 2008-10-08 03:01:40 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-10-08 03:01:40 -0400 |
commit | 9c8e3a0fac67d24bbc60ccb3920b6a9150e798bc (patch) | |
tree | 2acd9f7e2e43c83e6146065a31b6a9843a2f4f46 /arch/arm/mach-omap2/mcbsp.c | |
parent | b4b58f5834a023dab67201db9a626bef07bb200c (diff) |
ARM: OMAP: Add support for McBSP devices 3 - 5 on 34xx
Based on Chandra's earlier patches in linux-omap tree.
Signed-off-by: Chandra Shekhar <x0044955@ti.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 | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index 73f2279ef2ea..b4fe0f3714c0 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -28,7 +28,7 @@ struct mcbsp_internal_clk { | |||
28 | int n_childs; | 28 | int n_childs; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | #if defined(CONFIG_ARCH_OMAP24XX) | 31 | #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) |
32 | static void omap_mcbsp_clk_init(struct mcbsp_internal_clk *mclk) | 32 | static void omap_mcbsp_clk_init(struct mcbsp_internal_clk *mclk) |
33 | { | 33 | { |
34 | const char *clk_names[] = { "mcbsp_ick", "mcbsp_fck" }; | 34 | const char *clk_names[] = { "mcbsp_ick", "mcbsp_fck" }; |
@@ -89,6 +89,30 @@ static struct mcbsp_internal_clk omap_mcbsp_clks[] = { | |||
89 | .disable = omap_mcbsp_clk_disable, | 89 | .disable = omap_mcbsp_clk_disable, |
90 | }, | 90 | }, |
91 | }, | 91 | }, |
92 | { | ||
93 | .clk = { | ||
94 | .name = "mcbsp_clk", | ||
95 | .id = 3, | ||
96 | .enable = omap_mcbsp_clk_enable, | ||
97 | .disable = omap_mcbsp_clk_disable, | ||
98 | }, | ||
99 | }, | ||
100 | { | ||
101 | .clk = { | ||
102 | .name = "mcbsp_clk", | ||
103 | .id = 4, | ||
104 | .enable = omap_mcbsp_clk_enable, | ||
105 | .disable = omap_mcbsp_clk_disable, | ||
106 | }, | ||
107 | }, | ||
108 | { | ||
109 | .clk = { | ||
110 | .name = "mcbsp_clk", | ||
111 | .id = 5, | ||
112 | .enable = omap_mcbsp_clk_enable, | ||
113 | .disable = omap_mcbsp_clk_disable, | ||
114 | }, | ||
115 | }, | ||
92 | }; | 116 | }; |
93 | 117 | ||
94 | #define omap_mcbsp_clks_size ARRAY_SIZE(omap_mcbsp_clks) | 118 | #define omap_mcbsp_clks_size ARRAY_SIZE(omap_mcbsp_clks) |
@@ -168,6 +192,33 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | |||
168 | .ops = &omap2_mcbsp_ops, | 192 | .ops = &omap2_mcbsp_ops, |
169 | .clk_name = "mcbsp_clk", | 193 | .clk_name = "mcbsp_clk", |
170 | }, | 194 | }, |
195 | { | ||
196 | .phys_base = OMAP34XX_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 = OMAP34XX_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 = OMAP34XX_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 | }, | ||
171 | }; | 222 | }; |
172 | #define OMAP34XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap34xx_mcbsp_pdata) | 223 | #define OMAP34XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap34xx_mcbsp_pdata) |
173 | #else | 224 | #else |
@@ -198,6 +249,9 @@ static int __init omap2_mcbsp_init(void) | |||
198 | if (cpu_is_omap24xx()) | 249 | if (cpu_is_omap24xx()) |
199 | omap_mcbsp_register_board_cfg(omap24xx_mcbsp_pdata, | 250 | omap_mcbsp_register_board_cfg(omap24xx_mcbsp_pdata, |
200 | OMAP24XX_MCBSP_PDATA_SZ); | 251 | OMAP24XX_MCBSP_PDATA_SZ); |
252 | if (cpu_is_omap34xx()) | ||
253 | omap_mcbsp_register_board_cfg(omap34xx_mcbsp_pdata, | ||
254 | OMAP34XX_MCBSP_PDATA_SZ); | ||
201 | 255 | ||
202 | return omap_mcbsp_init(); | 256 | return omap_mcbsp_init(); |
203 | } | 257 | } |