summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/floppy.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-07-15 14:52:16 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-07-20 09:39:57 +0100
commit21d1ca04532005c50ed57c2b2948e465b2e90720 (patch)
tree92a77c52e28a898b1bfe6d10c3e7408e8585a8dd /include/asm-arm/floppy.h
parent1ad2cdbd0eaf0ddb3f634d10d01a2710b00b2051 (diff)
downloadblackbird-op-linux-21d1ca04532005c50ed57c2b2948e465b2e90720.tar.gz
blackbird-op-linux-21d1ca04532005c50ed57c2b2948e465b2e90720.zip
[ARM] avoid floppy warnings by using fd_dma_setup()
Avoid the virt_to_bus()/bus_to_virt() warnings in floppy.c caused by the (useless) double conversion to/from bus addresses. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/floppy.h')
-rw-r--r--include/asm-arm/floppy.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/include/asm-arm/floppy.h b/include/asm-arm/floppy.h
index 54b5ae44ed94..d595c15166a4 100644
--- a/include/asm-arm/floppy.h
+++ b/include/asm-arm/floppy.h
@@ -30,15 +30,21 @@
#define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK)
#define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK)
+static inline int fd_dma_setup(void *data, unsigned int length,
+ unsigned int mode, unsigned long addr)
+{
+ set_dma_mode(DMA_FLOPPY, mode);
+ __set_dma_addr(DMA_FLOPPY, data);
+ set_dma_count(DMA_FLOPPY, length);
+ virtual_dma_port = addr;
+ enable_dma(DMA_FLOPPY);
+ return 0;
+}
+#define fd_dma_setup fd_dma_setup
+
#define fd_request_dma() request_dma(DMA_FLOPPY,"floppy")
#define fd_free_dma() free_dma(DMA_FLOPPY)
#define fd_disable_dma() disable_dma(DMA_FLOPPY)
-#define fd_enable_dma() enable_dma(DMA_FLOPPY)
-#define fd_clear_dma_ff() clear_dma_ff(DMA_FLOPPY)
-#define fd_set_dma_mode(mode) set_dma_mode(DMA_FLOPPY, (mode))
-#define fd_set_dma_addr(addr) set_dma_addr(DMA_FLOPPY, virt_to_bus((addr)))
-#define fd_set_dma_count(len) set_dma_count(DMA_FLOPPY, (len))
-#define fd_cacheflush(addr,sz)
/* need to clean up dma.h */
#define DMA_FLOPPYDISK DMA_FLOPPY
OpenPOWER on IntegriCloud