mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
This commit is contained in:
parent
ea071cc705
commit
963accbc82
7 changed files with 26 additions and 26 deletions
|
|
@ -614,7 +614,7 @@ start_adc(struct au1550_state *s)
|
|||
/* Put two buffers on the ring to get things started.
|
||||
*/
|
||||
for (i=0; i<2; i++) {
|
||||
au1xxx_dbdma_put_dest(db->dmanr, db->nextIn,
|
||||
au1xxx_dbdma_put_dest(db->dmanr, virt_to_phys(db->nextIn),
|
||||
db->dma_fragsize, DDMA_FLAGS_IE);
|
||||
|
||||
db->nextIn += db->dma_fragsize;
|
||||
|
|
@ -733,8 +733,9 @@ static void dac_dma_interrupt(int irq, void *dev_id)
|
|||
db->dma_qcount--;
|
||||
|
||||
if (db->count >= db->fragsize) {
|
||||
if (au1xxx_dbdma_put_source(db->dmanr, db->nextOut,
|
||||
db->fragsize, DDMA_FLAGS_IE) == 0) {
|
||||
if (au1xxx_dbdma_put_source(db->dmanr,
|
||||
virt_to_phys(db->nextOut), db->fragsize,
|
||||
DDMA_FLAGS_IE) == 0) {
|
||||
err("qcount < 2 and no ring room!");
|
||||
}
|
||||
db->nextOut += db->fragsize;
|
||||
|
|
@ -778,7 +779,7 @@ static void adc_dma_interrupt(int irq, void *dev_id)
|
|||
|
||||
/* Put a new empty buffer on the destination DMA.
|
||||
*/
|
||||
au1xxx_dbdma_put_dest(dp->dmanr, dp->nextIn,
|
||||
au1xxx_dbdma_put_dest(dp->dmanr, virt_to_phys(dp->nextIn),
|
||||
dp->dma_fragsize, DDMA_FLAGS_IE);
|
||||
|
||||
dp->nextIn += dp->dma_fragsize;
|
||||
|
|
@ -1180,7 +1181,8 @@ au1550_write(struct file *file, const char *buffer, size_t count, loff_t * ppos)
|
|||
*/
|
||||
while ((db->dma_qcount < 2) && (db->count >= db->fragsize)) {
|
||||
if (au1xxx_dbdma_put_source(db->dmanr,
|
||||
db->nextOut, db->fragsize, DDMA_FLAGS_IE) == 0) {
|
||||
virt_to_phys(db->nextOut), db->fragsize,
|
||||
DDMA_FLAGS_IE) == 0) {
|
||||
err("qcount < 2 and no ring room!");
|
||||
}
|
||||
db->nextOut += db->fragsize;
|
||||
|
|
|
|||
Loading…
Reference in a new issue