aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorAndrew Victor <linux@maxim.org.za>2008-04-08 16:33:07 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-10 09:57:19 -0400
commitc21098ea5608c98b5ada1b7ec82522c7c53869eb (patch)
tree880579004273504c83cdd3d3b64e54e7a2aa8cef /sound/soc
parent5b7659d190fff2d69faec07314a51ba708f1f1ce (diff)
[ARM] 4912/2: [AT91] Endrelia audio driver must use GPIO interface
The SoC audio driver for the Endrelia ETI_B1 board should not access the PIO controller directly, but must rather use the AT91 GPIO interface. (This is updated version of patch with removed trailing whitespace) Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/at91/eti_b1_wm8731.c30
1 files changed, 7 insertions, 23 deletions
diff --git a/sound/soc/at91/eti_b1_wm8731.c b/sound/soc/at91/eti_b1_wm8731.c
index ad3ad9d662f8..1347dcf3f80b 100644
--- a/sound/soc/at91/eti_b1_wm8731.c
+++ b/sound/soc/at91/eti_b1_wm8731.c
@@ -33,8 +33,7 @@
33#include <sound/soc.h> 33#include <sound/soc.h>
34#include <sound/soc-dapm.h> 34#include <sound/soc-dapm.h>
35 35
36#include <asm/arch/hardware.h> 36#include <asm/hardware.h>
37#include <asm/arch/at91_pio.h>
38#include <asm/arch/gpio.h> 37#include <asm/arch/gpio.h>
39 38
40#include "../codecs/wm8731.h" 39#include "../codecs/wm8731.h"
@@ -47,13 +46,6 @@
47#define DBG(x...) 46#define DBG(x...)
48#endif 47#endif
49 48
50#define AT91_PIO_TF1 (1 << (AT91_PIN_PB6 - PIN_BASE) % 32)
51#define AT91_PIO_TK1 (1 << (AT91_PIN_PB7 - PIN_BASE) % 32)
52#define AT91_PIO_TD1 (1 << (AT91_PIN_PB8 - PIN_BASE) % 32)
53#define AT91_PIO_RD1 (1 << (AT91_PIN_PB9 - PIN_BASE) % 32)
54#define AT91_PIO_RK1 (1 << (AT91_PIN_PB10 - PIN_BASE) % 32)
55#define AT91_PIO_RF1 (1 << (AT91_PIN_PB11 - PIN_BASE) % 32)
56
57static struct clk *pck1_clk; 49static struct clk *pck1_clk;
58static struct clk *pllb_clk; 50static struct clk *pllb_clk;
59 51
@@ -276,7 +268,6 @@ static struct platform_device *eti_b1_snd_device;
276static int __init eti_b1_init(void) 268static int __init eti_b1_init(void)
277{ 269{
278 int ret; 270 int ret;
279 u32 ssc_pio_lines;
280 struct at91_ssc_periph *ssc = eti_b1_dai.cpu_dai->private_data; 271 struct at91_ssc_periph *ssc = eti_b1_dai.cpu_dai->private_data;
281 272
282 if (!request_mem_region(AT91RM9200_BASE_SSC1, SZ_16K, "soc-audio")) { 273 if (!request_mem_region(AT91RM9200_BASE_SSC1, SZ_16K, "soc-audio")) {
@@ -310,19 +301,12 @@ static int __init eti_b1_init(void)
310 goto fail_io_unmap; 301 goto fail_io_unmap;
311 } 302 }
312 303
313 ssc_pio_lines = AT91_PIO_TF1 | AT91_PIO_TK1 | AT91_PIO_TD1 304 at91_set_A_periph(AT91_PIN_PB6, 0); /* TF1 */
314 | AT91_PIO_RD1 /* | AT91_PIO_RK1 */ | AT91_PIO_RF1; 305 at91_set_A_periph(AT91_PIN_PB7, 0); /* TK1 */
315 306 at91_set_A_periph(AT91_PIN_PB8, 0); /* TD1 */
316 /* Reset all PIO registers and assign lines to peripheral A */ 307 at91_set_A_periph(AT91_PIN_PB9, 0); /* RD1 */
317 at91_sys_write(AT91_PIOB + PIO_PDR, ssc_pio_lines); 308/* at91_set_A_periph(AT91_PIN_PB10, 0);*/ /* RK1 */
318 at91_sys_write(AT91_PIOB + PIO_ODR, ssc_pio_lines); 309 at91_set_A_periph(AT91_PIN_PB11, 0); /* RF1 */
319 at91_sys_write(AT91_PIOB + PIO_IFDR, ssc_pio_lines);
320 at91_sys_write(AT91_PIOB + PIO_CODR, ssc_pio_lines);
321 at91_sys_write(AT91_PIOB + PIO_IDR, ssc_pio_lines);
322 at91_sys_write(AT91_PIOB + PIO_MDDR, ssc_pio_lines);
323 at91_sys_write(AT91_PIOB + PIO_PUDR, ssc_pio_lines);
324 at91_sys_write(AT91_PIOB + PIO_ASR, ssc_pio_lines);
325 at91_sys_write(AT91_PIOB + PIO_OWDR, ssc_pio_lines);
326 310
327 /* 311 /*
328 * Set PCK1 parent to PLLB and its rate to 12 Mhz. 312 * Set PCK1 parent to PLLB and its rate to 12 Mhz.