aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-28 17:25:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-28 17:25:01 -0400
commit68d99b2c8efcb6ed3807a55569300c53b5f88be5 (patch)
treef189c8f2132d3668a2f0e503f5c3f8695b26a1c8 /arch/mips/alchemy
parent0e59e7e7feb5a12938fbf9135147eeda3238c6c4 (diff)
parent8128c9f21509f9a8b6da94ac432d845dda458406 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (549 commits) ALSA: hda - Fix ADC input-amp handling for Cx20549 codec ALSA: hda - Keep EAPD turned on for old Conexant chips ALSA: hda/realtek - Fix missing volume controls with ALC260 ASoC: wm8940: Properly set codec->dapm.bias_level ALSA: hda - Fix pin-config for ASUS W90V ALSA: hda - Fix surround/CLFE headphone and speaker pins order ALSA: hda - Fix typo ALSA: Update the sound git tree URL ALSA: HDA: Add new revision for ALC662 ASoC: max98095: Convert codec->hw_write to snd_soc_write ASoC: keep pointer to resource so it can be freed ASoC: sgtl5000: Fix wrong mask in some snd_soc_update_bits calls ASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_2 ASoC: da7210: Add support for line out and DAC ASoC: da7210: Add support for DAPM ALSA: hda/realtek - Fix DAC assignments of multiple speakers ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value ASoC: Set sgtl5000->ldo in ldo_regulator_register ASoC: wm8996: Use SND_SOC_DAPM_AIF_OUT for AIF2 Capture ASoC: wm8994: Use SND_SOC_DAPM_AIF_OUT for AIF3 Capture ...
Diffstat (limited to 'arch/mips/alchemy')
-rw-r--r--arch/mips/alchemy/devboards/db1200/platform.c16
-rw-r--r--arch/mips/alchemy/devboards/db1x00/platform.c48
2 files changed, 64 insertions, 0 deletions
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);