12 #ifndef __ASM_ARM_FLOPPY_H
13 #define __ASM_ARM_FLOPPY_H
15 #include <mach/floppy.h>
18 #define fd_outb(val,port) \
20 if ((port) == FD_DOR) \
26 #define fd_inb(port) inb((port))
27 #define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\
28 IRQF_DISABLED,"floppy",NULL)
29 #define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL)
30 #define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK)
31 #define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK)
34 unsigned int mode,
unsigned long addr)
39 virtual_dma_port =
addr;
43 #define fd_dma_setup fd_dma_setup
45 #define fd_request_dma() request_dma(DMA_FLOPPY,"floppy")
46 #define fd_free_dma() free_dma(DMA_FLOPPY)
47 #define fd_disable_dma() disable_dma(DMA_FLOPPY)
50 #define DMA_FLOPPYDISK DMA_FLOPPY
59 static unsigned char floppy_selects[2][4] =
61 { 0x10, 0x21, 0x23, 0x33 },
62 { 0x10, 0x21, 0x23, 0x33 }
65 #define fd_setdor(dor) \
67 int new_dor = (dor); \
69 new_dor = (new_dor & 0x0c) | floppy_selects[fdc][new_dor & 3]; \
72 outb(new_dor, FD_DOR); \
78 static inline void fd_scandrives (
void)
81 int floppy, drive_count;
84 raw_cmd = &default_raw_cmd;
89 for (floppy = 0; floppy < 4; floppy ++) {
90 current_drive = drive_count;
94 if (start_motor(redo_fd_request))
104 LAST_OUT(
UNIT(floppy));
108 for (i = drive_count; i < 3; i--)
109 floppy_selects[fdc][i] = floppy_selects[fdc][i + 1];
110 floppy_selects[fdc][3] = 0;
116 floppy_selects[0][0] = 0x10;
117 floppy_selects[0][1] = 0x21;
118 floppy_selects[0][2] = 0x23;
119 floppy_selects[0][3] = 0x33;
125 #define FLOPPY0_TYPE 4
126 #define FLOPPY1_TYPE 4
131 #define CROSS_64KB(a,s) (0)
139 static void driveswap(
int *ints,
int dummy,
int dummy2)
141 floppy_selects[0][0] ^= floppy_selects[0][1];
142 floppy_selects[0][1] ^= floppy_selects[0][0];
143 floppy_selects[0][0] ^= floppy_selects[0][1];
146 #define EXTRA_FLOPPY_PARAMS ,{ "driveswap", &driveswap, NULL, 0, 0 }