summaryrefslogtreecommitdiff
path: root/arch/arm/kernel/dma.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-01-04 15:08:30 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-01-04 15:08:30 +0000
commit7cdad482974792419cfe4b0affca689170116f49 (patch)
treef9ee204f8848274ffb3323f425ad039cf4807de6 /arch/arm/kernel/dma.c
parent333c9624b728a9e83b741ea75836aa114ec35272 (diff)
[ARM] Remove '__address' from scatterlist and convert to DMA API
The old __address element in struct scatterlist remained from older kernels because the ARM DMA emulation code made use of it. Move this field into struct dma_struct, and convert DMA emulation code to setup a SG entry as required. Also, convert DMA emulation code to use the new DMA API rather than the PCI DMA API. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/dma.c')
-rw-r--r--arch/arm/kernel/dma.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/arm/kernel/dma.c b/arch/arm/kernel/dma.c
index 3aedada71046..913fd947528c 100644
--- a/arch/arm/kernel/dma.c
+++ b/arch/arm/kernel/dma.c
@@ -123,7 +123,6 @@ void set_dma_sg (dmach_t channel, struct scatterlist *sg, int nr_sg)
dma->sg = sg;
dma->sgcount = nr_sg;
- dma->using_sg = 1;
dma->invalid = 1;
}
@@ -139,10 +138,8 @@ void __set_dma_addr (dmach_t channel, void *addr)
printk(KERN_ERR "dma%d: altering DMA address while "
"DMA active\n", channel);
- dma->sg = &dma->buf;
- dma->sgcount = 1;
- dma->buf.__address = addr;
- dma->using_sg = 0;
+ dma->sg = NULL;
+ dma->addr = addr;
dma->invalid = 1;
}
@@ -158,10 +155,8 @@ void set_dma_count (dmach_t channel, unsigned long count)
printk(KERN_ERR "dma%d: altering DMA count while "
"DMA active\n", channel);
- dma->sg = &dma->buf;
- dma->sgcount = 1;
- dma->buf.length = count;
- dma->using_sg = 0;
+ dma->sg = NULL;
+ dma->count = count;
dma->invalid = 1;
}