floppy: consolidate the dummy fd_cacheflush definition
Only mips defines this helper, so remove all the other arch definitions. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
This commit is contained in:
parent
d89e2378a9
commit
acfef4f126
@ -24,7 +24,6 @@
|
|||||||
#define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA,count)
|
#define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA,count)
|
||||||
#define fd_enable_irq() enable_irq(FLOPPY_IRQ)
|
#define fd_enable_irq() enable_irq(FLOPPY_IRQ)
|
||||||
#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
|
#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
|
||||||
#define fd_cacheflush(addr,size) /* nothing */
|
|
||||||
#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt,\
|
#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt,\
|
||||||
0, "floppy", NULL)
|
0, "floppy", NULL)
|
||||||
#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL)
|
#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL)
|
||||||
@ -62,7 +61,6 @@ alpha_fd_dma_setup(char *addr, unsigned long size, int mode, int io)
|
|||||||
prev_dir = dir;
|
prev_dir = dir;
|
||||||
|
|
||||||
fd_clear_dma_ff();
|
fd_clear_dma_ff();
|
||||||
fd_cacheflush(addr, size);
|
|
||||||
fd_set_dma_mode(mode);
|
fd_set_dma_mode(mode);
|
||||||
set_dma_addr(FLOPPY_DMA, bus_addr);
|
set_dma_addr(FLOPPY_DMA, bus_addr);
|
||||||
fd_set_dma_count(size);
|
fd_set_dma_count(size);
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#define fd_get_dma_residue() fd_ops->_get_dma_residue(FLOPPY_DMA)
|
#define fd_get_dma_residue() fd_ops->_get_dma_residue(FLOPPY_DMA)
|
||||||
#define fd_enable_irq() enable_irq(FLOPPY_IRQ)
|
#define fd_enable_irq() enable_irq(FLOPPY_IRQ)
|
||||||
#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
|
#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
|
||||||
#define fd_cacheflush(addr,size) /* nothing */
|
|
||||||
#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL);
|
#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL);
|
||||||
|
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
@ -152,7 +151,6 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
|
|||||||
prev_dir = dir;
|
prev_dir = dir;
|
||||||
|
|
||||||
fd_clear_dma_ff();
|
fd_clear_dma_ff();
|
||||||
fd_cacheflush(addr, size);
|
|
||||||
fd_set_dma_mode(mode);
|
fd_set_dma_mode(mode);
|
||||||
set_dma_addr(FLOPPY_DMA, bus_addr);
|
set_dma_addr(FLOPPY_DMA, bus_addr);
|
||||||
fd_set_dma_count(size);
|
fd_set_dma_count(size);
|
||||||
|
@ -70,7 +70,6 @@ static struct sun_floppy_ops sun_fdops;
|
|||||||
#define fd_set_dma_count(count) sun_fd_set_dma_count(count)
|
#define fd_set_dma_count(count) sun_fd_set_dma_count(count)
|
||||||
#define fd_enable_irq() /* nothing... */
|
#define fd_enable_irq() /* nothing... */
|
||||||
#define fd_disable_irq() /* nothing... */
|
#define fd_disable_irq() /* nothing... */
|
||||||
#define fd_cacheflush(addr, size) /* nothing... */
|
|
||||||
#define fd_request_irq() sun_fd_request_irq()
|
#define fd_request_irq() sun_fd_request_irq()
|
||||||
#define fd_free_irq() /* nothing... */
|
#define fd_free_irq() /* nothing... */
|
||||||
#if 0 /* P3: added by Alain, these cause a MMU corruption. 19960524 XXX */
|
#if 0 /* P3: added by Alain, these cause a MMU corruption. 19960524 XXX */
|
||||||
|
@ -72,7 +72,6 @@ static struct sun_floppy_ops sun_fdops;
|
|||||||
#define fd_set_dma_addr(addr) sun_fdops.fd_set_dma_addr(addr)
|
#define fd_set_dma_addr(addr) sun_fdops.fd_set_dma_addr(addr)
|
||||||
#define fd_set_dma_count(count) sun_fdops.fd_set_dma_count(count)
|
#define fd_set_dma_count(count) sun_fdops.fd_set_dma_count(count)
|
||||||
#define get_dma_residue(x) sun_fdops.get_dma_residue()
|
#define get_dma_residue(x) sun_fdops.get_dma_residue()
|
||||||
#define fd_cacheflush(addr, size) /* nothing... */
|
|
||||||
#define fd_request_irq() sun_fdops.fd_request_irq()
|
#define fd_request_irq() sun_fdops.fd_request_irq()
|
||||||
#define fd_free_irq() sun_fdops.fd_free_irq()
|
#define fd_free_irq() sun_fdops.fd_free_irq()
|
||||||
#define fd_eject(drive) sun_fdops.fd_eject(drive)
|
#define fd_eject(drive) sun_fdops.fd_eject(drive)
|
||||||
|
@ -275,6 +275,10 @@ static int set_next_request(void);
|
|||||||
#define fd_dma_mem_alloc(size) __get_dma_pages(GFP_KERNEL, get_order(size))
|
#define fd_dma_mem_alloc(size) __get_dma_pages(GFP_KERNEL, get_order(size))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef fd_cacheflush
|
||||||
|
#define fd_cacheflush(addr, size) /* nothing... */
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline void fallback_on_nodma_alloc(char **addr, size_t l)
|
static inline void fallback_on_nodma_alloc(char **addr, size_t l)
|
||||||
{
|
{
|
||||||
#ifdef FLOPPY_CAN_FALLBACK_ON_NODMA
|
#ifdef FLOPPY_CAN_FALLBACK_ON_NODMA
|
||||||
|
Loading…
Reference in New Issue
Block a user