1
2
3
4
5
6
7
8
9
10 #ifndef __ASM_MIPS_FLOPPY_H
11 #define __ASM_MIPS_FLOPPY_H
12
13 #include <asm/bootinfo.h>
14 #include <asm/jazz.h>
15 #include <asm/jazzdma.h>
16 #include <asm/mipsconfig.h>
17 #include <asm/vector.h>
18
19 #define fd_inb(port) feature->fd_inb(port)
20 #define fd_outb(value,port) feature->fd_outb(value,port)
21
22 #define fd_enable_dma() feature->fd_enable_dma()
23 #define fd_disable_dma() feature->fd_disable_dma()
24 #define fd_request_dma() feature->fd_request_dma()
25 #define fd_free_dma() feature->fd_free_dma()
26 #define fd_clear_dma_ff() feature->fd_clear_dma_ff()
27 #define fd_set_dma_mode(mode) feature->fd_set_dma_mode(mode)
28 #define fd_set_dma_addr(addr) feature->fd_set_dma_addr(addr)
29 #define fd_set_dma_count(count) feature->fd_set_dma_count(count)
30 #define fd_get_dma_residue() feature->fd_get_dma_residue()
31 #define fd_enable_irq() feature->fd_enable_irq()
32 #define fd_disable_irq() feature->fd_disable_irq()
33 #define fd_cacheflush(addr, size) feature->fd_cacheflush((void *)addr, size)
34 #define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \
35 SA_INTERRUPT|SA_SAMPLE_RANDOM, \
36 "floppy")
37 #define fd_free_irq() free_irq(FLOPPY_IRQ);
38
39 #define MAX_BUFFER_SECTORS 24
40 #define virtual_dma_init() \
41 if (boot_info.machtype == MACH_ACER_PICA_61 || \
42 boot_info.machtype == MACH_MIPS_MAGNUM_4000 || \
43 boot_info.machtype == MACH_OLIVETTI_M700) \
44 vdma_alloc(PHYSADDR(floppy_track_buffer), \
45 512*2*MAX_BUFFER_SECTORS);
46
47
48
49
50
51
52
53 #define FLOPPY0_TYPE 4
54 #define FLOPPY1_TYPE 0
55
56 #define FDC1 ((boot_info.machtype == MACH_ACER_PICA_61 || \
57 boot_info.machtype == MACH_MIPS_MAGNUM_4000 || \
58 boot_info.machtype == MACH_OLIVETTI_M700) ? \
59 0xe0003000 : 0x3f0)
60 static int FDC2=-1;
61
62 #define N_FDC 1
63 #define N_DRIVE 8
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78 #define CROSS_64KB(a,s) ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64)
79
80 #endif