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 /sound/oss | |
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 'sound/oss')
-rw-r--r-- | sound/oss/au1550_ac97.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c index b9ff0b798032..c1070e33b32f 100644 --- a/sound/oss/au1550_ac97.c +++ b/sound/oss/au1550_ac97.c | |||
@@ -614,7 +614,7 @@ start_adc(struct au1550_state *s) | |||
614 | /* Put two buffers on the ring to get things started. | 614 | /* Put two buffers on the ring to get things started. |
615 | */ | 615 | */ |
616 | for (i=0; i<2; i++) { | 616 | for (i=0; i<2; i++) { |
617 | au1xxx_dbdma_put_dest(db->dmanr, db->nextIn, | 617 | au1xxx_dbdma_put_dest(db->dmanr, virt_to_phys(db->nextIn), |
618 | db->dma_fragsize, DDMA_FLAGS_IE); | 618 | db->dma_fragsize, DDMA_FLAGS_IE); |
619 | 619 | ||
620 | db->nextIn += db->dma_fragsize; | 620 | db->nextIn += db->dma_fragsize; |
@@ -733,8 +733,9 @@ static void dac_dma_interrupt(int irq, void *dev_id) | |||
733 | db->dma_qcount--; | 733 | db->dma_qcount--; |
734 | 734 | ||
735 | if (db->count >= db->fragsize) { | 735 | if (db->count >= db->fragsize) { |
736 | if (au1xxx_dbdma_put_source(db->dmanr, db->nextOut, | 736 | if (au1xxx_dbdma_put_source(db->dmanr, |
737 | db->fragsize, DDMA_FLAGS_IE) == 0) { | 737 | virt_to_phys(db->nextOut), db->fragsize, |
738 | DDMA_FLAGS_IE) == 0) { | ||
738 | err("qcount < 2 and no ring room!"); | 739 | err("qcount < 2 and no ring room!"); |
739 | } | 740 | } |
740 | db->nextOut += db->fragsize; | 741 | db->nextOut += db->fragsize; |
@@ -778,7 +779,7 @@ static void adc_dma_interrupt(int irq, void *dev_id) | |||
778 | 779 | ||
779 | /* Put a new empty buffer on the destination DMA. | 780 | /* Put a new empty buffer on the destination DMA. |
780 | */ | 781 | */ |
781 | au1xxx_dbdma_put_dest(dp->dmanr, dp->nextIn, | 782 | au1xxx_dbdma_put_dest(dp->dmanr, virt_to_phys(dp->nextIn), |
782 | dp->dma_fragsize, DDMA_FLAGS_IE); | 783 | dp->dma_fragsize, DDMA_FLAGS_IE); |
783 | 784 | ||
784 | dp->nextIn += dp->dma_fragsize; | 785 | dp->nextIn += dp->dma_fragsize; |
@@ -1180,7 +1181,8 @@ au1550_write(struct file *file, const char *buffer, size_t count, loff_t * ppos) | |||
1180 | */ | 1181 | */ |
1181 | while ((db->dma_qcount < 2) && (db->count >= db->fragsize)) { | 1182 | while ((db->dma_qcount < 2) && (db->count >= db->fragsize)) { |
1182 | if (au1xxx_dbdma_put_source(db->dmanr, | 1183 | if (au1xxx_dbdma_put_source(db->dmanr, |
1183 | db->nextOut, db->fragsize, DDMA_FLAGS_IE) == 0) { | 1184 | virt_to_phys(db->nextOut), db->fragsize, |
1185 | DDMA_FLAGS_IE) == 0) { | ||
1184 | err("qcount < 2 and no ring room!"); | 1186 | err("qcount < 2 and no ring room!"); |
1185 | } | 1187 | } |
1186 | db->nextOut += db->fragsize; | 1188 | db->nextOut += db->fragsize; |