diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2011-07-25 07:44:46 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-07-27 14:10:48 -0400 |
commit | b2ce305dda483e59a78d5aa6e4211034c0cea38d (patch) | |
tree | 995694664f2b2654a0ff121277ec59875da56d05 /arch/mips/alchemy | |
parent | b3c70c9ea62a3ae6c63536e43fa28f965a56de91 (diff) |
ASoC: Add a DB1x00 AC97 machine driver
Add a machine driver suitable for the AC97 part on the DB1000/DB1500/DB1100
boards.
Run-tested on DB1500.
Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'arch/mips/alchemy')
-rw-r--r-- | arch/mips/alchemy/devboards/db1x00/platform.c | 48 |
1 files changed, 48 insertions, 0 deletions
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 | ||
91 | static 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 | |||
109 | static 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 | |||
116 | static struct platform_device alchemy_ac97c_dma_dev = { | ||
117 | .name = "alchemy-pcm-dma", | ||
118 | .id = 0, | ||
119 | }; | ||
120 | |||
121 | static struct platform_device db1x00_codec_dev = { | ||
122 | .name = "ac97-codec", | ||
123 | .id = -1, | ||
124 | }; | ||
125 | |||
126 | static struct platform_device db1x00_audio_dev = { | ||
127 | .name = "db1000-audio", | ||
128 | }; | ||
129 | |||
88 | static int __init db1xxx_dev_init(void) | 130 | static 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 | } |
118 | device_initcall(db1xxx_dev_init); | 166 | device_initcall(db1xxx_dev_init); |