aboutsummaryrefslogtreecommitdiffstats
path: root/sound/sparc
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2006-08-16 06:53:34 -0400
committerJaroslav Kysela <perex@suse.cz>2006-09-23 04:40:51 -0400
commit42fe7647911d0bcaf81aac46db73a3b24387df6d (patch)
tree89aed63c7fb4384658edc827048f4613938e885c /sound/sparc
parentfe25befde9723ba7d921c100bf00d7643323e5a7 (diff)
[ALSA] dbri driver cleanup
This is a small clean up of the dbri driver for sparc machines. It contains also a fix to DBRI interrupt queue initialization. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/sparc')
-rw-r--r--sound/sparc/dbri.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index f3ae6e23610e..652f433a3f0d 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -104,17 +104,15 @@ static char *cmds[] = {
104 104
105#define dprintk(a, x...) if(dbri_debug & a) printk(KERN_DEBUG x) 105#define dprintk(a, x...) if(dbri_debug & a) printk(KERN_DEBUG x)
106 106
107#define DBRI_CMD(cmd, intr, value) ((cmd << 28) | \
108 (1 << 27) | \
109 value)
110#else 107#else
111#define dprintk(a, x...) 108#define dprintk(a, x...)
112 109
113#define DBRI_CMD(cmd, intr, value) ((cmd << 28) | \
114 (intr << 27) | \
115 value)
116#endif /* DBRI_DEBUG */ 110#endif /* DBRI_DEBUG */
117 111
112#define DBRI_CMD(cmd, intr, value) ((cmd << 28) | \
113 (intr << 27) | \
114 value)
115
118/*************************************************************************** 116/***************************************************************************
119 CS4215 specific definitions and structures 117 CS4215 specific definitions and structures
120****************************************************************************/ 118****************************************************************************/
@@ -690,7 +688,6 @@ static volatile s32 *dbri_cmdlock(struct snd_dbri * dbri, enum dbri_lock get)
690static void dbri_cmdsend(struct snd_dbri * dbri, volatile s32 * cmd) 688static void dbri_cmdsend(struct snd_dbri * dbri, volatile s32 * cmd)
691{ 689{
692 volatile s32 *ptr; 690 volatile s32 *ptr;
693 u32 reg;
694 691
695 for (ptr = &dbri->dma->cmd[0]; ptr < cmd; ptr++) { 692 for (ptr = &dbri->dma->cmd[0]; ptr < cmd; ptr++) {
696 dprintk(D_CMD, "cmd: %lx:%08x\n", (unsigned long)ptr, *ptr); 693 dprintk(D_CMD, "cmd: %lx:%08x\n", (unsigned long)ptr, *ptr);
@@ -709,9 +706,6 @@ static void dbri_cmdsend(struct snd_dbri * dbri, volatile s32 * cmd)
709 706
710 /* Set command pointer and signal it is valid. */ 707 /* Set command pointer and signal it is valid. */
711 sbus_writel(dbri->dma_dvma, dbri->regs + REG8); 708 sbus_writel(dbri->dma_dvma, dbri->regs + REG8);
712 reg = sbus_readl(dbri->regs + REG0);
713 reg |= D_P;
714 sbus_writel(reg, dbri->regs + REG0);
715 709
716 /*spin_unlock(&dbri->lock); */ 710 /*spin_unlock(&dbri->lock); */
717} 711}
@@ -752,7 +746,7 @@ static void dbri_initialize(struct snd_dbri * dbri)
752 */ 746 */
753 for (n = 0; n < DBRI_NO_INTS - 1; n++) { 747 for (n = 0; n < DBRI_NO_INTS - 1; n++) {
754 dma_addr = dbri->dma_dvma; 748 dma_addr = dbri->dma_dvma;
755 dma_addr += dbri_dma_off(intr, ((n + 1) & DBRI_INT_BLK)); 749 dma_addr += dbri_dma_off(intr, ((n + 1) * DBRI_INT_BLK));
756 dbri->dma->intr[n * DBRI_INT_BLK] = dma_addr; 750 dbri->dma->intr[n * DBRI_INT_BLK] = dma_addr;
757 } 751 }
758 dma_addr = dbri->dma_dvma + dbri_dma_off(intr, 0); 752 dma_addr = dbri->dma_dvma + dbri_dma_off(intr, 0);