aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ep93xx/edb93xx.c6
-rw-r--r--arch/arm/mach-ep93xx/simone.c13
-rw-r--r--arch/arm/mach-ep93xx/snappercl15.c13
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c1
-rw-r--r--arch/arm/mach-omap2/devices.c33
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c2
-rw-r--r--arch/arm/plat-omap/devices.c36
-rw-r--r--arch/mips/alchemy/devboards/db1200/platform.c16
-rw-r--r--arch/mips/alchemy/devboards/db1x00/platform.c48
9 files changed, 128 insertions, 40 deletions
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c
index c63a5ec1a8e3..70ef8c527d27 100644
--- a/arch/arm/mach-ep93xx/edb93xx.c
+++ b/arch/arm/mach-ep93xx/edb93xx.c
@@ -160,6 +160,11 @@ static void __init edb93xx_register_spi(void)
160/************************************************************************* 160/*************************************************************************
161 * EDB93xx I2S 161 * EDB93xx I2S
162 *************************************************************************/ 162 *************************************************************************/
163static struct platform_device edb93xx_audio_device = {
164 .name = "edb93xx-audio",
165 .id = -1,
166};
167
163static int __init edb93xx_has_audio(void) 168static int __init edb93xx_has_audio(void)
164{ 169{
165 return (machine_is_edb9301() || machine_is_edb9302() || 170 return (machine_is_edb9301() || machine_is_edb9302() ||
@@ -171,6 +176,7 @@ static void __init edb93xx_register_i2s(void)
171{ 176{
172 if (edb93xx_has_audio()) { 177 if (edb93xx_has_audio()) {
173 ep93xx_register_i2s(); 178 ep93xx_register_i2s();
179 platform_device_register(&edb93xx_audio_device);
174 } 180 }
175} 181}
176 182
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c
index d6f286b4db9c..52e090dc9d27 100644
--- a/arch/arm/mach-ep93xx/simone.c
+++ b/arch/arm/mach-ep93xx/simone.c
@@ -53,6 +53,17 @@ static struct i2c_board_info __initdata simone_i2c_board_info[] = {
53 }, 53 },
54}; 54};
55 55
56static struct platform_device simone_audio_device = {
57 .name = "simone-audio",
58 .id = -1,
59};
60
61static void __init simone_register_audio(void)
62{
63 ep93xx_register_ac97();
64 platform_device_register(&simone_audio_device);
65}
66
56static void __init simone_init_machine(void) 67static void __init simone_init_machine(void)
57{ 68{
58 ep93xx_init_devices(); 69 ep93xx_init_devices();
@@ -61,7 +72,7 @@ static void __init simone_init_machine(void)
61 ep93xx_register_fb(&simone_fb_info); 72 ep93xx_register_fb(&simone_fb_info);
62 ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info, 73 ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info,
63 ARRAY_SIZE(simone_i2c_board_info)); 74 ARRAY_SIZE(simone_i2c_board_info));
64 ep93xx_register_ac97(); 75 simone_register_audio();
65} 76}
66 77
67MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board") 78MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c
index 2b4d4b0201df..8121e3aedc0a 100644
--- a/arch/arm/mach-ep93xx/snappercl15.c
+++ b/arch/arm/mach-ep93xx/snappercl15.c
@@ -150,6 +150,17 @@ static struct ep93xxfb_mach_info __initdata snappercl15_fb_info = {
150 .bpp = 16, 150 .bpp = 16,
151}; 151};
152 152
153static struct platform_device snappercl15_audio_device = {
154 .name = "snappercl15-audio",
155 .id = -1,
156};
157
158static void __init snappercl15_register_audio(void)
159{
160 ep93xx_register_i2s();
161 platform_device_register(&snappercl15_audio_device);
162}
163
153static void __init snappercl15_init_machine(void) 164static void __init snappercl15_init_machine(void)
154{ 165{
155 ep93xx_init_devices(); 166 ep93xx_init_devices();
@@ -157,7 +168,7 @@ static void __init snappercl15_init_machine(void)
157 ep93xx_register_i2c(&snappercl15_i2c_gpio_data, snappercl15_i2c_data, 168 ep93xx_register_i2c(&snappercl15_i2c_gpio_data, snappercl15_i2c_data,
158 ARRAY_SIZE(snappercl15_i2c_data)); 169 ARRAY_SIZE(snappercl15_i2c_data));
159 ep93xx_register_fb(&snappercl15_fb_info); 170 ep93xx_register_fb(&snappercl15_fb_info);
160 ep93xx_register_i2s(); 171 snappercl15_register_audio();
161 platform_device_register(&snappercl15_nand_device); 172 platform_device_register(&snappercl15_nand_device);
162} 173}
163 174
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 5a886cd2c598..ba1aa07bdb29 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -900,7 +900,6 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
900}; 900};
901 901
902static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata_or_module = { 902static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata_or_module = {
903 .id = TPA6130A2,
904 .power_gpio = 98, 903 .power_gpio = 98,
905}; 904};
906 905
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 5391079c8689..ae8ea5b3b1a0 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -329,6 +329,38 @@ static void omap_init_audio(void)
329static inline void omap_init_audio(void) {} 329static inline void omap_init_audio(void) {}
330#endif 330#endif
331 331
332#if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
333 defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
334
335static struct omap_device_pm_latency omap_mcpdm_latency[] = {
336 {
337 .deactivate_func = omap_device_idle_hwmods,
338 .activate_func = omap_device_enable_hwmods,
339 .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
340 },
341};
342
343static void omap_init_mcpdm(void)
344{
345 struct omap_hwmod *oh;
346 struct omap_device *od;
347
348 oh = omap_hwmod_lookup("mcpdm");
349 if (!oh) {
350 printk(KERN_ERR "Could not look up mcpdm hw_mod\n");
351 return;
352 }
353
354 od = omap_device_build("omap-mcpdm", -1, oh, NULL, 0,
355 omap_mcpdm_latency,
356 ARRAY_SIZE(omap_mcpdm_latency), 0);
357 if (IS_ERR(od))
358 printk(KERN_ERR "Could not build omap_device for omap-mcpdm-dai\n");
359}
360#else
361static inline void omap_init_mcpdm(void) {}
362#endif
363
332#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) 364#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
333 365
334#include <plat/mcspi.h> 366#include <plat/mcspi.h>
@@ -682,6 +714,7 @@ static int __init omap2_init_devices(void)
682 * in alphabetical order so they're easier to sort through. 714 * in alphabetical order so they're easier to sort through.
683 */ 715 */
684 omap_init_audio(); 716 omap_init_audio();
717 omap_init_mcpdm();
685 omap_init_camera(); 718 omap_init_camera();
686 omap_init_mbox(); 719 omap_init_mbox();
687 omap_init_mcspi(); 720 omap_init_mcspi();
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 6201422c0606..79325c65c23c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -5430,7 +5430,7 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
5430 &omap44xx_mcbsp4_hwmod, 5430 &omap44xx_mcbsp4_hwmod,
5431 5431
5432 /* mcpdm class */ 5432 /* mcpdm class */
5433/* &omap44xx_mcpdm_hwmod, */ 5433 &omap44xx_mcpdm_hwmod,
5434 5434
5435 /* mcspi class */ 5435 /* mcspi class */
5436 &omap44xx_mcspi1_hwmod, 5436 &omap44xx_mcspi1_hwmod,
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 64c3bd4aa54e..c46c47afa090 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -73,41 +73,6 @@ void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
73 73
74/*-------------------------------------------------------------------------*/ 74/*-------------------------------------------------------------------------*/
75 75
76#if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
77 defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
78
79static struct resource mcpdm_resources[] = {
80 {
81 .name = "mcpdm_mem",
82 .start = OMAP44XX_MCPDM_BASE,
83 .end = OMAP44XX_MCPDM_BASE + SZ_4K,
84 .flags = IORESOURCE_MEM,
85 },
86 {
87 .name = "mcpdm_irq",
88 .start = OMAP44XX_IRQ_MCPDM,
89 .end = OMAP44XX_IRQ_MCPDM,
90 .flags = IORESOURCE_IRQ,
91 },
92};
93
94static struct platform_device omap_mcpdm_device = {
95 .name = "omap-mcpdm",
96 .id = -1,
97 .num_resources = ARRAY_SIZE(mcpdm_resources),
98 .resource = mcpdm_resources,
99};
100
101static void omap_init_mcpdm(void)
102{
103 (void) platform_device_register(&omap_mcpdm_device);
104}
105#else
106static inline void omap_init_mcpdm(void) {}
107#endif
108
109/*-------------------------------------------------------------------------*/
110
111#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ 76#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \
112 defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) 77 defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
113 78
@@ -290,7 +255,6 @@ static int __init omap_init_devices(void)
290 * in alphabetical order so they're easier to sort through. 255 * in alphabetical order so they're easier to sort through.
291 */ 256 */
292 omap_init_rng(); 257 omap_init_rng();
293 omap_init_mcpdm();
294 omap_init_uwire(); 258 omap_init_uwire();
295 return 0; 259 return 0;
296} 260}
diff --git a/arch/mips/alchemy/devboards/db1200/platform.c b/arch/mips/alchemy/devboards/db1200/platform.c
index fbb55935b99e..dda090bf74e6 100644
--- a/arch/mips/alchemy/devboards/db1200/platform.c
+++ b/arch/mips/alchemy/devboards/db1200/platform.c
@@ -422,6 +422,7 @@ static struct resource au1200_psc1_res[] = {
422 }, 422 },
423}; 423};
424 424
425/* AC97 or I2S device */
425static struct platform_device db1200_audio_dev = { 426static struct platform_device db1200_audio_dev = {
426 /* name assigned later based on switch setting */ 427 /* name assigned later based on switch setting */
427 .id = 1, /* PSC ID */ 428 .id = 1, /* PSC ID */
@@ -429,19 +430,32 @@ static struct platform_device db1200_audio_dev = {
429 .resource = au1200_psc1_res, 430 .resource = au1200_psc1_res,
430}; 431};
431 432
433/* DB1200 ASoC card device */
434static struct platform_device db1200_sound_dev = {
435 /* name assigned later based on switch setting */
436 .id = 1, /* PSC ID */
437};
438
432static struct platform_device db1200_stac_dev = { 439static struct platform_device db1200_stac_dev = {
433 .name = "ac97-codec", 440 .name = "ac97-codec",
434 .id = 1, /* on PSC1 */ 441 .id = 1, /* on PSC1 */
435}; 442};
436 443
444static struct platform_device db1200_audiodma_dev = {
445 .name = "au1xpsc-pcm",
446 .id = 1, /* PSC ID */
447};
448
437static struct platform_device *db1200_devs[] __initdata = { 449static struct platform_device *db1200_devs[] __initdata = {
438 NULL, /* PSC0, selected by S6.8 */ 450 NULL, /* PSC0, selected by S6.8 */
439 &db1200_ide_dev, 451 &db1200_ide_dev,
440 &db1200_eth_dev, 452 &db1200_eth_dev,
441 &db1200_rtc_dev, 453 &db1200_rtc_dev,
442 &db1200_nand_dev, 454 &db1200_nand_dev,
455 &db1200_audiodma_dev,
443 &db1200_audio_dev, 456 &db1200_audio_dev,
444 &db1200_stac_dev, 457 &db1200_stac_dev,
458 &db1200_sound_dev,
445}; 459};
446 460
447static int __init db1200_dev_init(void) 461static int __init db1200_dev_init(void)
@@ -501,10 +515,12 @@ static int __init db1200_dev_init(void)
501 if (sw == BCSR_SWITCHES_DIP_8) { 515 if (sw == BCSR_SWITCHES_DIP_8) {
502 bcsr_mod(BCSR_RESETS, 0, BCSR_RESETS_PSC1MUX); 516 bcsr_mod(BCSR_RESETS, 0, BCSR_RESETS_PSC1MUX);
503 db1200_audio_dev.name = "au1xpsc_i2s"; 517 db1200_audio_dev.name = "au1xpsc_i2s";
518 db1200_sound_dev.name = "db1200-i2s";
504 printk(KERN_INFO " S6.7 ON : PSC1 mode I2S\n"); 519 printk(KERN_INFO " S6.7 ON : PSC1 mode I2S\n");
505 } else { 520 } else {
506 bcsr_mod(BCSR_RESETS, BCSR_RESETS_PSC1MUX, 0); 521 bcsr_mod(BCSR_RESETS, BCSR_RESETS_PSC1MUX, 0);
507 db1200_audio_dev.name = "au1xpsc_ac97"; 522 db1200_audio_dev.name = "au1xpsc_ac97";
523 db1200_sound_dev.name = "db1200-ac97";
508 printk(KERN_INFO " S6.7 OFF: PSC1 mode AC97\n"); 524 printk(KERN_INFO " S6.7 OFF: PSC1 mode AC97\n");
509 } 525 }
510 526
diff --git a/arch/mips/alchemy/devboards/db1x00/platform.c b/arch/mips/alchemy/devboards/db1x00/platform.c
index 978d5ab3d678..7057d28f7301 100644
--- a/arch/mips/alchemy/devboards/db1x00/platform.c
+++ b/arch/mips/alchemy/devboards/db1x00/platform.c
@@ -19,8 +19,11 @@
19 */ 19 */
20 20
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/interrupt.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
23 24
25#include <asm/mach-au1x00/au1000.h>
26#include <asm/mach-au1x00/au1000_dma.h>
24#include <asm/mach-au1x00/au1xxx.h> 27#include <asm/mach-au1x00/au1xxx.h>
25#include <asm/mach-db1x00/bcsr.h> 28#include <asm/mach-db1x00/bcsr.h>
26#include "../platform.h" 29#include "../platform.h"
@@ -85,6 +88,45 @@
85#endif 88#endif
86#endif 89#endif
87 90
91static struct resource alchemy_ac97c_res[] = {
92 [0] = {
93 .start = AU1000_AC97_PHYS_ADDR,
94 .end = AU1000_AC97_PHYS_ADDR + 0xfff,
95 .flags = IORESOURCE_MEM,
96 },
97 [1] = {
98 .start = DMA_ID_AC97C_TX,
99 .end = DMA_ID_AC97C_TX,
100 .flags = IORESOURCE_DMA,
101 },
102 [2] = {
103 .start = DMA_ID_AC97C_RX,
104 .end = DMA_ID_AC97C_RX,
105 .flags = IORESOURCE_DMA,
106 },
107};
108
109static struct platform_device alchemy_ac97c_dev = {
110 .name = "alchemy-ac97c",
111 .id = -1,
112 .resource = alchemy_ac97c_res,
113 .num_resources = ARRAY_SIZE(alchemy_ac97c_res),
114};
115
116static struct platform_device alchemy_ac97c_dma_dev = {
117 .name = "alchemy-pcm-dma",
118 .id = 0,
119};
120
121static struct platform_device db1x00_codec_dev = {
122 .name = "ac97-codec",
123 .id = -1,
124};
125
126static struct platform_device db1x00_audio_dev = {
127 .name = "db1000-audio",
128};
129
88static int __init db1xxx_dev_init(void) 130static int __init db1xxx_dev_init(void)
89{ 131{
90#ifdef DB1XXX_HAS_PCMCIA 132#ifdef DB1XXX_HAS_PCMCIA
@@ -113,6 +155,12 @@ static int __init db1xxx_dev_init(void)
113 1); 155 1);
114#endif 156#endif
115 db1x_register_norflash(BOARD_FLASH_SIZE, BOARD_FLASH_WIDTH, F_SWAPPED); 157 db1x_register_norflash(BOARD_FLASH_SIZE, BOARD_FLASH_WIDTH, F_SWAPPED);
158
159 platform_device_register(&db1x00_codec_dev);
160 platform_device_register(&alchemy_ac97c_dma_dev);
161 platform_device_register(&alchemy_ac97c_dev);
162 platform_device_register(&db1x00_audio_dev);
163
116 return 0; 164 return 0;
117} 165}
118device_initcall(db1xxx_dev_init); 166device_initcall(db1xxx_dev_init);