ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-ppc / floppy.h
1 /*
2  * Architecture specific parts of the Floppy driver
3  *
4  * This file is subject to the terms and conditions of the GNU General Public
5  * License.  See the file "COPYING" in the main directory of this archive
6  * for more details.
7  *
8  * Copyright (C) 1995
9  */
10 #ifdef __KERNEL__
11 #ifndef __ASM_PPC_FLOPPY_H
12 #define __ASM_PPC_FLOPPY_H
13
14 #define fd_inb(port)                    inb_p(port)
15 #define fd_outb(value,port)             outb_p(value,port)
16
17 #define fd_enable_dma()         enable_dma(FLOPPY_DMA)
18 #define fd_disable_dma()        disable_dma(FLOPPY_DMA)
19 #define fd_request_dma()        request_dma(FLOPPY_DMA,"floppy")
20 #define fd_free_dma()           free_dma(FLOPPY_DMA)
21 #define fd_clear_dma_ff()       clear_dma_ff(FLOPPY_DMA)
22 #define fd_set_dma_mode(mode)   set_dma_mode(FLOPPY_DMA,mode)
23 #define fd_set_dma_addr(addr)   set_dma_addr(FLOPPY_DMA,(unsigned int)virt_to_bus(addr))
24 #define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA,count)
25 #define fd_enable_irq()         enable_irq(FLOPPY_IRQ)
26 #define fd_disable_irq()        disable_irq(FLOPPY_IRQ)
27 #define fd_cacheflush(addr,size) /* nothing */
28 #define fd_request_irq()        request_irq(FLOPPY_IRQ, floppy_interrupt, \
29                                             SA_INTERRUPT|SA_SAMPLE_RANDOM, \
30                                             "floppy", NULL)
31 #define fd_free_irq()           free_irq(FLOPPY_IRQ, NULL);
32
33 __inline__ void virtual_dma_init(void)
34 {
35         /* Nothing to do on PowerPC */
36 }
37
38 static int FDC1 = 0x3f0;
39 static int FDC2 = -1;
40
41 /*
42  * Again, the CMOS information not available
43  */
44 #define FLOPPY0_TYPE 6
45 #define FLOPPY1_TYPE 0
46
47 #define N_FDC 2                 /* Don't change this! */
48 #define N_DRIVE 8
49
50 #define FLOPPY_MOTOR_MASK 0xf0
51
52 /*
53  * The PowerPC has no problems with floppy DMA crossing 64k borders.
54  */
55 #define CROSS_64KB(a,s) (0)
56
57 #endif /* __ASM_PPC_FLOPPY_H */
58
59 #define EXTRA_FLOPPY_PARAMS
60
61 #endif /* __KERNEL__ */