diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2009-10-13 14:22:35 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-02-27 06:52:55 -0500 |
commit | 963accbc82a0912b39de39d59e2fd6741db3aa4b (patch) | |
tree | 4ea340b0261ab19f3f0776f47e4fab8708934b5b /arch/mips/alchemy/common | |
parent | ea071cc705e8bfba0c8bf84be8d4f9f4e9da6962 (diff) |
MIPS: Alchemy: change dbdma to accept physical memory addresses
DMA can only be done from physical addresses; move the "virt_to_phys"
source/destination buffer address translation from the dbdma queueing
functions (since the hardware can only DMA to/from physical addresses)
to their respective users.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy/common')
-rw-r--r-- | arch/mips/alchemy/common/dbdma.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/alchemy/common/dbdma.c b/arch/mips/alchemy/common/dbdma.c index 864b6dab6368..3b2ccc05e20b 100644 --- a/arch/mips/alchemy/common/dbdma.c +++ b/arch/mips/alchemy/common/dbdma.c | |||
@@ -571,7 +571,7 @@ EXPORT_SYMBOL(au1xxx_dbdma_ring_alloc); | |||
571 | * This updates the source pointer and byte count. Normally used | 571 | * This updates the source pointer and byte count. Normally used |
572 | * for memory to fifo transfers. | 572 | * for memory to fifo transfers. |
573 | */ | 573 | */ |
574 | u32 au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags) | 574 | u32 au1xxx_dbdma_put_source(u32 chanid, dma_addr_t buf, int nbytes, u32 flags) |
575 | { | 575 | { |
576 | chan_tab_t *ctp; | 576 | chan_tab_t *ctp; |
577 | au1x_ddma_desc_t *dp; | 577 | au1x_ddma_desc_t *dp; |
@@ -597,7 +597,7 @@ u32 au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags) | |||
597 | return 0; | 597 | return 0; |
598 | 598 | ||
599 | /* Load up buffer address and byte count. */ | 599 | /* Load up buffer address and byte count. */ |
600 | dp->dscr_source0 = virt_to_phys(buf); | 600 | dp->dscr_source0 = buf & ~0UL; |
601 | dp->dscr_cmd1 = nbytes; | 601 | dp->dscr_cmd1 = nbytes; |
602 | /* Check flags */ | 602 | /* Check flags */ |
603 | if (flags & DDMA_FLAGS_IE) | 603 | if (flags & DDMA_FLAGS_IE) |
@@ -630,7 +630,7 @@ EXPORT_SYMBOL(au1xxx_dbdma_put_source); | |||
630 | * This updates the destination pointer and byte count. Normally used | 630 | * This updates the destination pointer and byte count. Normally used |
631 | * to place an empty buffer into the ring for fifo to memory transfers. | 631 | * to place an empty buffer into the ring for fifo to memory transfers. |
632 | */ | 632 | */ |
633 | u32 au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags) | 633 | u32 au1xxx_dbdma_put_dest(u32 chanid, dma_addr_t buf, int nbytes, u32 flags) |
634 | { | 634 | { |
635 | chan_tab_t *ctp; | 635 | chan_tab_t *ctp; |
636 | au1x_ddma_desc_t *dp; | 636 | au1x_ddma_desc_t *dp; |
@@ -660,7 +660,7 @@ u32 au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags) | |||
660 | if (flags & DDMA_FLAGS_NOIE) | 660 | if (flags & DDMA_FLAGS_NOIE) |
661 | dp->dscr_cmd0 &= ~DSCR_CMD0_IE; | 661 | dp->dscr_cmd0 &= ~DSCR_CMD0_IE; |
662 | 662 | ||
663 | dp->dscr_dest0 = virt_to_phys(buf); | 663 | dp->dscr_dest0 = buf & ~0UL; |
664 | dp->dscr_cmd1 = nbytes; | 664 | dp->dscr_cmd1 = nbytes; |
665 | #if 0 | 665 | #if 0 |
666 | printk(KERN_DEBUG "cmd0:%x cmd1:%x source0:%x source1:%x dest0:%x dest1:%x\n", | 666 | printk(KERN_DEBUG "cmd0:%x cmd1:%x source0:%x source1:%x dest0:%x dest1:%x\n", |