aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/at91/at91-i2s.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/at91/at91-i2s.c')
-rw-r--r--sound/soc/at91/at91-i2s.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/sound/soc/at91/at91-i2s.c b/sound/soc/at91/at91-i2s.c
index fcc544a96ba3..9fc0c0388881 100644
--- a/sound/soc/at91/at91-i2s.c
+++ b/sound/soc/at91/at91-i2s.c
@@ -20,6 +20,8 @@
20#include <linux/device.h> 20#include <linux/device.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/atmel_pdc.h>
24
23#include <sound/driver.h> 25#include <sound/driver.h>
24#include <sound/core.h> 26#include <sound/core.h>
25#include <sound/pcm.h> 27#include <sound/pcm.h>
@@ -29,7 +31,6 @@
29#include <asm/arch/hardware.h> 31#include <asm/arch/hardware.h>
30#include <asm/arch/at91_pmc.h> 32#include <asm/arch/at91_pmc.h>
31#include <asm/arch/at91_ssc.h> 33#include <asm/arch/at91_ssc.h>
32#include <asm/arch/at91_pdc.h>
33 34
34#include "at91-pcm.h" 35#include "at91-pcm.h"
35#include "at91-i2s.h" 36#include "at91-i2s.h"
@@ -51,17 +52,17 @@
51 * SSC PDC registers required by the PCM DMA engine. 52 * SSC PDC registers required by the PCM DMA engine.
52 */ 53 */
53static struct at91_pdc_regs pdc_tx_reg = { 54static struct at91_pdc_regs pdc_tx_reg = {
54 .xpr = AT91_PDC_TPR, 55 .xpr = ATMEL_PDC_TPR,
55 .xcr = AT91_PDC_TCR, 56 .xcr = ATMEL_PDC_TCR,
56 .xnpr = AT91_PDC_TNPR, 57 .xnpr = ATMEL_PDC_TNPR,
57 .xncr = AT91_PDC_TNCR, 58 .xncr = ATMEL_PDC_TNCR,
58}; 59};
59 60
60static struct at91_pdc_regs pdc_rx_reg = { 61static struct at91_pdc_regs pdc_rx_reg = {
61 .xpr = AT91_PDC_RPR, 62 .xpr = ATMEL_PDC_RPR,
62 .xcr = AT91_PDC_RCR, 63 .xcr = ATMEL_PDC_RCR,
63 .xnpr = AT91_PDC_RNPR, 64 .xnpr = ATMEL_PDC_RNPR,
64 .xncr = AT91_PDC_RNCR, 65 .xncr = ATMEL_PDC_RNCR,
65}; 66};
66 67
67/* 68/*
@@ -72,8 +73,8 @@ static struct at91_ssc_mask ssc_tx_mask = {
72 .ssc_disable = AT91_SSC_TXDIS, 73 .ssc_disable = AT91_SSC_TXDIS,
73 .ssc_endx = AT91_SSC_ENDTX, 74 .ssc_endx = AT91_SSC_ENDTX,
74 .ssc_endbuf = AT91_SSC_TXBUFE, 75 .ssc_endbuf = AT91_SSC_TXBUFE,
75 .pdc_enable = AT91_PDC_TXTEN, 76 .pdc_enable = ATMEL_PDC_TXTEN,
76 .pdc_disable = AT91_PDC_TXTDIS, 77 .pdc_disable = ATMEL_PDC_TXTDIS,
77}; 78};
78 79
79static struct at91_ssc_mask ssc_rx_mask = { 80static struct at91_ssc_mask ssc_rx_mask = {
@@ -81,8 +82,8 @@ static struct at91_ssc_mask ssc_rx_mask = {
81 .ssc_disable = AT91_SSC_RXDIS, 82 .ssc_disable = AT91_SSC_RXDIS,
82 .ssc_endx = AT91_SSC_ENDRX, 83 .ssc_endx = AT91_SSC_ENDRX,
83 .ssc_endbuf = AT91_SSC_RXBUFF, 84 .ssc_endbuf = AT91_SSC_RXBUFF,
84 .pdc_enable = AT91_PDC_RXTEN, 85 .pdc_enable = ATMEL_PDC_RXTEN,
85 .pdc_disable = AT91_PDC_RXTDIS, 86 .pdc_disable = ATMEL_PDC_RXTDIS,
86}; 87};
87 88
88 89
@@ -508,14 +509,14 @@ static int at91_i2s_hw_params(struct snd_pcm_substream *substream,
508 /* Reset the SSC and its PDC registers */ 509 /* Reset the SSC and its PDC registers */
509 at91_ssc_write(ssc_p->ssc.base + AT91_SSC_CR, AT91_SSC_SWRST); 510 at91_ssc_write(ssc_p->ssc.base + AT91_SSC_CR, AT91_SSC_SWRST);
510 511
511 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_RPR, 0); 512 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_RPR, 0);
512 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_RCR, 0); 513 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_RCR, 0);
513 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_RNPR, 0); 514 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_RNPR, 0);
514 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_RNCR, 0); 515 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_RNCR, 0);
515 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_TPR, 0); 516 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_TPR, 0);
516 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_TCR, 0); 517 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_TCR, 0);
517 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_TNPR, 0); 518 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_TNPR, 0);
518 at91_ssc_write(ssc_p->ssc.base + AT91_PDC_TNCR, 0); 519 at91_ssc_write(ssc_p->ssc.base + ATMEL_PDC_TNCR, 0);
519 520
520 if ((ret = request_irq(ssc_p->ssc.pid, at91_i2s_interrupt, 521 if ((ret = request_irq(ssc_p->ssc.pid, at91_i2s_interrupt,
521 0, ssc_p->name, ssc_p)) < 0) { 522 0, ssc_p->name, ssc_p)) < 0) {