diff options
Diffstat (limited to 'arch/arm/plat-omap/devices.c')
| -rw-r--r-- | arch/arm/plat-omap/devices.c | 85 |
1 files changed, 1 insertions, 84 deletions
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index ea28f98d5d6a..19719329a47b 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * the Free Software Foundation; either version 2 of the License, or | 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
| 10 | */ | 10 | */ |
| 11 | 11 | #include <linux/gpio.h> | |
| 12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
| 13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| @@ -24,91 +24,9 @@ | |||
| 24 | #include <plat/tc.h> | 24 | #include <plat/tc.h> |
| 25 | #include <plat/board.h> | 25 | #include <plat/board.h> |
| 26 | #include <plat/mmc.h> | 26 | #include <plat/mmc.h> |
| 27 | #include <mach/gpio.h> | ||
| 28 | #include <plat/menelaus.h> | 27 | #include <plat/menelaus.h> |
| 29 | #include <plat/mcbsp.h> | ||
| 30 | #include <plat/omap44xx.h> | 28 | #include <plat/omap44xx.h> |
| 31 | 29 | ||
| 32 | /*-------------------------------------------------------------------------*/ | ||
| 33 | |||
| 34 | #if defined(CONFIG_OMAP_MCBSP) || defined(CONFIG_OMAP_MCBSP_MODULE) | ||
| 35 | |||
| 36 | static struct platform_device **omap_mcbsp_devices; | ||
| 37 | |||
| 38 | void omap_mcbsp_register_board_cfg(struct resource *res, int res_count, | ||
| 39 | struct omap_mcbsp_platform_data *config, int size) | ||
| 40 | { | ||
| 41 | int i; | ||
| 42 | |||
| 43 | omap_mcbsp_devices = kzalloc(size * sizeof(struct platform_device *), | ||
| 44 | GFP_KERNEL); | ||
| 45 | if (!omap_mcbsp_devices) { | ||
| 46 | printk(KERN_ERR "Could not register McBSP devices\n"); | ||
| 47 | return; | ||
| 48 | } | ||
| 49 | |||
| 50 | for (i = 0; i < size; i++) { | ||
| 51 | struct platform_device *new_mcbsp; | ||
| 52 | int ret; | ||
| 53 | |||
| 54 | new_mcbsp = platform_device_alloc("omap-mcbsp", i + 1); | ||
| 55 | if (!new_mcbsp) | ||
| 56 | continue; | ||
| 57 | platform_device_add_resources(new_mcbsp, &res[i * res_count], | ||
| 58 | res_count); | ||
| 59 | new_mcbsp->dev.platform_data = &config[i]; | ||
| 60 | ret = platform_device_add(new_mcbsp); | ||
| 61 | if (ret) { | ||
| 62 | platform_device_put(new_mcbsp); | ||
| 63 | continue; | ||
| 64 | } | ||
| 65 | omap_mcbsp_devices[i] = new_mcbsp; | ||
| 66 | } | ||
| 67 | } | ||
| 68 | |||
| 69 | #else | ||
| 70 | void omap_mcbsp_register_board_cfg(struct resource *res, int res_count, | ||
| 71 | struct omap_mcbsp_platform_data *config, int size) | ||
| 72 | { } | ||
| 73 | #endif | ||
| 74 | |||
| 75 | /*-------------------------------------------------------------------------*/ | ||
| 76 | |||
| 77 | #if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \ | ||
| 78 | defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE) | ||
| 79 | |||
| 80 | static struct resource mcpdm_resources[] = { | ||
| 81 | { | ||
| 82 | .name = "mcpdm_mem", | ||
| 83 | .start = OMAP44XX_MCPDM_BASE, | ||
| 84 | .end = OMAP44XX_MCPDM_BASE + SZ_4K, | ||
| 85 | .flags = IORESOURCE_MEM, | ||
| 86 | }, | ||
| 87 | { | ||
| 88 | .name = "mcpdm_irq", | ||
| 89 | .start = OMAP44XX_IRQ_MCPDM, | ||
| 90 | .end = OMAP44XX_IRQ_MCPDM, | ||
| 91 | .flags = IORESOURCE_IRQ, | ||
| 92 | }, | ||
| 93 | }; | ||
| 94 | |||
| 95 | static struct platform_device omap_mcpdm_device = { | ||
| 96 | .name = "omap-mcpdm", | ||
| 97 | .id = -1, | ||
| 98 | .num_resources = ARRAY_SIZE(mcpdm_resources), | ||
| 99 | .resource = mcpdm_resources, | ||
| 100 | }; | ||
| 101 | |||
| 102 | static void omap_init_mcpdm(void) | ||
| 103 | { | ||
| 104 | (void) platform_device_register(&omap_mcpdm_device); | ||
| 105 | } | ||
| 106 | #else | ||
| 107 | static inline void omap_init_mcpdm(void) {} | ||
| 108 | #endif | ||
| 109 | |||
| 110 | /*-------------------------------------------------------------------------*/ | ||
| 111 | |||
| 112 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ | 30 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ |
| 113 | defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) | 31 | defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) |
| 114 | 32 | ||
| @@ -291,7 +209,6 @@ static int __init omap_init_devices(void) | |||
| 291 | * in alphabetical order so they're easier to sort through. | 209 | * in alphabetical order so they're easier to sort through. |
| 292 | */ | 210 | */ |
| 293 | omap_init_rng(); | 211 | omap_init_rng(); |
| 294 | omap_init_mcpdm(); | ||
| 295 | omap_init_uwire(); | 212 | omap_init_uwire(); |
| 296 | return 0; | 213 | return 0; |
| 297 | } | 214 | } |
