aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/au1000/common/dbdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/au1000/common/dbdma.c')
-rw-r--r--arch/mips/au1000/common/dbdma.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c
index cf10dc246f82..8f78c2fe7cf5 100644
--- a/arch/mips/au1000/common/dbdma.c
+++ b/arch/mips/au1000/common/dbdma.c
@@ -39,11 +39,11 @@
39#include <linux/string.h> 39#include <linux/string.h>
40#include <linux/delay.h> 40#include <linux/delay.h>
41#include <linux/interrupt.h> 41#include <linux/interrupt.h>
42#include <linux/module.h>
42#include <asm/mach-au1x00/au1000.h> 43#include <asm/mach-au1x00/au1000.h>
43#include <asm/mach-au1x00/au1xxx_dbdma.h> 44#include <asm/mach-au1x00/au1xxx_dbdma.h>
44#include <asm/system.h> 45#include <asm/system.h>
45 46
46/* #include <linux/module.h> */
47 47
48#if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200) 48#if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200)
49 49
@@ -596,10 +596,10 @@ _au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags)
596 * these parts. If it is fixedin the future, these dma_cache_inv will 596 * these parts. If it is fixedin the future, these dma_cache_inv will
597 * just be nothing more than empty macros. See io.h. 597 * just be nothing more than empty macros. See io.h.
598 * */ 598 * */
599 dma_cache_wback_inv(buf,nbytes); 599 dma_cache_wback_inv((unsigned long)buf, nbytes);
600 dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */ 600 dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
601 au_sync(); 601 au_sync();
602 dma_cache_wback_inv(dp, sizeof(dp)); 602 dma_cache_wback_inv((unsigned long)dp, sizeof(dp));
603 ctp->chan_ptr->ddma_dbell = 0; 603 ctp->chan_ptr->ddma_dbell = 0;
604 604
605 /* return something not zero. 605 /* return something not zero.
@@ -657,10 +657,10 @@ _au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags)
657 * parts. If it is fixedin the future, these dma_cache_inv will just 657 * parts. If it is fixedin the future, these dma_cache_inv will just
658 * be nothing more than empty macros. See io.h. 658 * be nothing more than empty macros. See io.h.
659 * */ 659 * */
660 dma_cache_inv(buf,nbytes); 660 dma_cache_inv((unsigned long)buf,nbytes);
661 dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */ 661 dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
662 au_sync(); 662 au_sync();
663 dma_cache_wback_inv(dp, sizeof(dp)); 663 dma_cache_wback_inv((unsigned long)dp, sizeof(dp));
664 ctp->chan_ptr->ddma_dbell = 0; 664 ctp->chan_ptr->ddma_dbell = 0;
665 665
666 /* Get next descriptor pointer. 666 /* Get next descriptor pointer.
@@ -820,8 +820,7 @@ au1xxx_dbdma_chan_free(u32 chanid)
820 820
821 au1xxx_dbdma_stop(chanid); 821 au1xxx_dbdma_stop(chanid);
822 822
823 if (ctp->chan_desc_base != NULL) 823 kfree((void *)ctp->chan_desc_base);
824 kfree(ctp->chan_desc_base);
825 824
826 stp->dev_flags &= ~DEV_FLAGS_INUSE; 825 stp->dev_flags &= ~DEV_FLAGS_INUSE;
827 dtp->dev_flags &= ~DEV_FLAGS_INUSE; 826 dtp->dev_flags &= ~DEV_FLAGS_INUSE;
@@ -831,11 +830,11 @@ au1xxx_dbdma_chan_free(u32 chanid)
831} 830}
832EXPORT_SYMBOL(au1xxx_dbdma_chan_free); 831EXPORT_SYMBOL(au1xxx_dbdma_chan_free);
833 832
834static void 833static irqreturn_t
835dbdma_interrupt(int irq, void *dev_id, struct pt_regs *regs) 834dbdma_interrupt(int irq, void *dev_id, struct pt_regs *regs)
836{ 835{
837 u32 intstat, flags; 836 u32 intstat;
838 u32 chan_index; 837 u32 chan_index;
839 chan_tab_t *ctp; 838 chan_tab_t *ctp;
840 au1x_ddma_desc_t *dp; 839 au1x_ddma_desc_t *dp;
841 au1x_dma_chan_t *cp; 840 au1x_dma_chan_t *cp;
@@ -857,6 +856,7 @@ dbdma_interrupt(int irq, void *dev_id, struct pt_regs *regs)
857 (ctp->chan_callback)(irq, ctp->chan_callparam, regs); 856 (ctp->chan_callback)(irq, ctp->chan_callparam, regs);
858 857
859 ctp->cur_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); 858 ctp->cur_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
859 return IRQ_RETVAL(1);
860} 860}
861 861
862static void au1xxx_dbdma_init(void) 862static void au1xxx_dbdma_init(void)