提交 21d1ca04 编写于 作者: R Russell King 提交者: Russell King

[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: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 1ad2cdbd
...@@ -30,15 +30,21 @@ ...@@ -30,15 +30,21 @@
#define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) #define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK)
#define fd_enable_irq() enable_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_request_dma() request_dma(DMA_FLOPPY,"floppy")
#define fd_free_dma() free_dma(DMA_FLOPPY) #define fd_free_dma() free_dma(DMA_FLOPPY)
#define fd_disable_dma() disable_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 */ /* need to clean up dma.h */
#define DMA_FLOPPYDISK DMA_FLOPPY #define DMA_FLOPPYDISK DMA_FLOPPY
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册