Commit 6fb98280 authored by Krzysztof Helt's avatar Krzysztof Helt Committed by Jaroslav Kysela

[ALSA] sparc dbri removal of DBRI_NO_INTS

This patch removes define DBR_NO_INTS and all code related to
handling more than one dbri irq statuses block.
Signed-off-by: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 42fe7647
...@@ -238,12 +238,6 @@ static struct { ...@@ -238,12 +238,6 @@ static struct {
#define REG9 0x24UL /* Interrupt Queue Pointer */ #define REG9 0x24UL /* Interrupt Queue Pointer */
#define DBRI_NO_CMDS 64 #define DBRI_NO_CMDS 64
#define DBRI_NO_INTS 1 /* Note: the value of this define was
* originally 2. The ringbuffer to store
* interrupts in dma is currently broken.
* This is a temporary fix until the ringbuffer
* is fixed.
*/
#define DBRI_INT_BLK 64 #define DBRI_INT_BLK 64
#define DBRI_NO_DESCS 64 #define DBRI_NO_DESCS 64
#define DBRI_NO_PIPES 32 #define DBRI_NO_PIPES 32
...@@ -268,7 +262,7 @@ struct dbri_mem { ...@@ -268,7 +262,7 @@ struct dbri_mem {
*/ */
struct dbri_dma { struct dbri_dma {
volatile s32 cmd[DBRI_NO_CMDS]; /* Place for commands */ volatile s32 cmd[DBRI_NO_CMDS]; /* Place for commands */
volatile s32 intr[DBRI_NO_INTS * DBRI_INT_BLK]; /* Interrupt field */ volatile s32 intr[DBRI_INT_BLK]; /* Interrupt field */
struct dbri_mem desc[DBRI_NO_DESCS]; /* Xmit/receive descriptors */ struct dbri_mem desc[DBRI_NO_DESCS]; /* Xmit/receive descriptors */
}; };
...@@ -741,18 +735,6 @@ static void dbri_initialize(struct snd_dbri * dbri) ...@@ -741,18 +735,6 @@ static void dbri_initialize(struct snd_dbri * dbri)
dprintk(D_GEN, "init: cmd: %p, int: %p\n", dprintk(D_GEN, "init: cmd: %p, int: %p\n",
&dbri->dma->cmd[0], &dbri->dma->intr[0]); &dbri->dma->cmd[0], &dbri->dma->intr[0]);
/*
* Initialize the interrupt ringbuffer.
*/
for (n = 0; n < DBRI_NO_INTS - 1; n++) {
dma_addr = dbri->dma_dvma;
dma_addr += dbri_dma_off(intr, ((n + 1) * DBRI_INT_BLK));
dbri->dma->intr[n * DBRI_INT_BLK] = dma_addr;
}
dma_addr = dbri->dma_dvma + dbri_dma_off(intr, 0);
dbri->dma->intr[n * DBRI_INT_BLK] = dma_addr;
dbri->dbri_irqp = 1;
/* Initialize pipes */ /* Initialize pipes */
for (n = 0; n < DBRI_NO_PIPES; n++) for (n = 0; n < DBRI_NO_PIPES; n++)
dbri->pipes[n].desc = dbri->pipes[n].first_desc = -1; dbri->pipes[n].desc = dbri->pipes[n].first_desc = -1;
...@@ -765,9 +747,14 @@ static void dbri_initialize(struct snd_dbri * dbri) ...@@ -765,9 +747,14 @@ static void dbri_initialize(struct snd_dbri * dbri)
sbus_writel(tmp, dbri->regs + REG0); sbus_writel(tmp, dbri->regs + REG0);
/* /*
* Set up the interrupt queue * Initialize the interrupt ringbuffer.
*/ */
dma_addr = dbri->dma_dvma + dbri_dma_off(intr, 0); dma_addr = dbri->dma_dvma + dbri_dma_off(intr, 0);
dbri->dma->intr[0] = dma_addr;
dbri->dbri_irqp = 1;
/*
* Set up the interrupt queue
*/
*(cmd++) = DBRI_CMD(D_IIQ, 0, 0); *(cmd++) = DBRI_CMD(D_IIQ, 0, 0);
*(cmd++) = dma_addr; *(cmd++) = dma_addr;
...@@ -1951,10 +1938,8 @@ static void dbri_process_interrupt_buffer(struct snd_dbri * dbri) ...@@ -1951,10 +1938,8 @@ static void dbri_process_interrupt_buffer(struct snd_dbri * dbri)
while ((x = dbri->dma->intr[dbri->dbri_irqp]) != 0) { while ((x = dbri->dma->intr[dbri->dbri_irqp]) != 0) {
dbri->dma->intr[dbri->dbri_irqp] = 0; dbri->dma->intr[dbri->dbri_irqp] = 0;
dbri->dbri_irqp++; dbri->dbri_irqp++;
if (dbri->dbri_irqp == (DBRI_NO_INTS * DBRI_INT_BLK)) if (dbri->dbri_irqp == DBRI_INT_BLK)
dbri->dbri_irqp = 1; dbri->dbri_irqp = 1;
else if ((dbri->dbri_irqp & (DBRI_INT_BLK - 1)) == 0)
dbri->dbri_irqp++;
dbri_process_one_interrupt(dbri, x); dbri_process_one_interrupt(dbri, x);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment