diff options
author | Jorge Eduardo Candelaria <x0107209@ti.com> | 2010-02-15 13:03:35 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-02-15 13:03:35 -0500 |
commit | d6a2d9b800276140abf352908abbd0c240890692 (patch) | |
tree | 5136005b28d867d27f04fa7bd6ffcd07b23cdbcc /arch/arm/plat-omap/devices.c | |
parent | 302720f3b722b8084bc59b214b8da5f50dd3e0b1 (diff) |
OMAP4: MCPDM: Register McPDM platform device
Add platform device for McPDM interface in OMAP4 and register
its memory and irq resources.
Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/devices.c')
-rw-r--r-- | arch/arm/plat-omap/devices.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 59f92c8bfc6d..3a3e357fff3c 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <plat/menelaus.h> | 28 | #include <plat/menelaus.h> |
29 | #include <plat/mcbsp.h> | 29 | #include <plat/mcbsp.h> |
30 | #include <plat/dsp_common.h> | 30 | #include <plat/dsp_common.h> |
31 | #include <plat/omap44xx.h> | ||
31 | 32 | ||
32 | #if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE) | 33 | #if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE) |
33 | 34 | ||
@@ -192,6 +193,41 @@ void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config, | |||
192 | 193 | ||
193 | /*-------------------------------------------------------------------------*/ | 194 | /*-------------------------------------------------------------------------*/ |
194 | 195 | ||
196 | #if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \ | ||
197 | defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE) | ||
198 | |||
199 | static struct resource mcpdm_resources[] = { | ||
200 | { | ||
201 | .name = "mcpdm_mem", | ||
202 | .start = OMAP44XX_MCPDM_BASE, | ||
203 | .end = OMAP44XX_MCPDM_BASE + SZ_4K, | ||
204 | .flags = IORESOURCE_MEM, | ||
205 | }, | ||
206 | { | ||
207 | .name = "mcpdm_irq", | ||
208 | .start = INT_44XX_MCPDM_IRQ, | ||
209 | .end = INT_44XX_MCPDM_IRQ, | ||
210 | .flags = IORESOURCE_IRQ, | ||
211 | }, | ||
212 | }; | ||
213 | |||
214 | static struct platform_device omap_mcpdm_device = { | ||
215 | .name = "omap-mcpdm", | ||
216 | .id = -1, | ||
217 | .num_resources = ARRAY_SIZE(mcpdm_resources), | ||
218 | .resource = mcpdm_resources, | ||
219 | }; | ||
220 | |||
221 | static void omap_init_mcpdm(void) | ||
222 | { | ||
223 | (void) platform_device_register(&omap_mcpdm_device); | ||
224 | } | ||
225 | #else | ||
226 | static inline void omap_init_mcpdm(void) {} | ||
227 | #endif | ||
228 | |||
229 | /*-------------------------------------------------------------------------*/ | ||
230 | |||
195 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ | 231 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ |
196 | defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) | 232 | defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) |
197 | 233 | ||
@@ -385,6 +421,7 @@ static int __init omap_init_devices(void) | |||
385 | omap_init_dsp(); | 421 | omap_init_dsp(); |
386 | omap_init_kp(); | 422 | omap_init_kp(); |
387 | omap_init_rng(); | 423 | omap_init_rng(); |
424 | omap_init_mcpdm(); | ||
388 | omap_init_uwire(); | 425 | omap_init_uwire(); |
389 | omap_init_wdt(); | 426 | omap_init_wdt(); |
390 | return 0; | 427 | return 0; |