xref: /openbmc/linux/arch/mips/include/asm/floppy.h (revision 1dd71588)
1384740dcSRalf Baechle /*
2384740dcSRalf Baechle  * Architecture specific parts of the Floppy driver
3384740dcSRalf Baechle  *
4384740dcSRalf Baechle  * This file is subject to the terms and conditions of the GNU General Public
5384740dcSRalf Baechle  * License.  See the file "COPYING" in the main directory of this archive
6384740dcSRalf Baechle  * for more details.
7384740dcSRalf Baechle  *
8384740dcSRalf Baechle  * Copyright (C) 1995 - 2000 Ralf Baechle
9384740dcSRalf Baechle  */
10384740dcSRalf Baechle #ifndef _ASM_FLOPPY_H
11384740dcSRalf Baechle #define _ASM_FLOPPY_H
12384740dcSRalf Baechle 
131dd71588SChristoph Hellwig #include <asm/io.h>
14384740dcSRalf Baechle 
fd_cacheflush(char * addr,long size)15384740dcSRalf Baechle static inline void fd_cacheflush(char * addr, long size)
16384740dcSRalf Baechle {
171dd71588SChristoph Hellwig 	dma_cache_wback_inv((unsigned long)addr, size);
18384740dcSRalf Baechle }
19384740dcSRalf Baechle 
20384740dcSRalf Baechle #define MAX_BUFFER_SECTORS 24
21384740dcSRalf Baechle 
22384740dcSRalf Baechle 
23384740dcSRalf Baechle /*
24384740dcSRalf Baechle  * And on Mips's the CMOS info fails also ...
25384740dcSRalf Baechle  *
26384740dcSRalf Baechle  * FIXME: This information should come from the ARC configuration tree
2725985edcSLucas De Marchi  *	  or wherever a particular machine has stored this ...
28384740dcSRalf Baechle  */
29384740dcSRalf Baechle #define FLOPPY0_TYPE		fd_drive_type(0)
30384740dcSRalf Baechle #define FLOPPY1_TYPE		fd_drive_type(1)
31384740dcSRalf Baechle 
32497888cfSPhil Carmody #define FDC1			fd_getfdaddr1()
33384740dcSRalf Baechle 
34384740dcSRalf Baechle #define N_FDC 1			/* do you *really* want a second controller? */
35384740dcSRalf Baechle #define N_DRIVE 8
36384740dcSRalf Baechle 
37384740dcSRalf Baechle /*
38384740dcSRalf Baechle  * The DMA channel used by the floppy controller cannot access data at
39384740dcSRalf Baechle  * addresses >= 16MB
40384740dcSRalf Baechle  *
41384740dcSRalf Baechle  * Went back to the 1MB limit, as some people had problems with the floppy
42384740dcSRalf Baechle  * driver otherwise. It doesn't matter much for performance anyway, as most
43384740dcSRalf Baechle  * floppy accesses go through the track buffer.
44384740dcSRalf Baechle  *
45384740dcSRalf Baechle  * On MIPSes using vdma, this actually means that *all* transfers go thru
46384740dcSRalf Baechle  * the * track buffer since 0x1000000 is always smaller than KSEG0/1.
47384740dcSRalf Baechle  * Actually this needs to be a bit more complicated since the so much different
48384740dcSRalf Baechle  * hardware available with MIPS CPUs ...
49384740dcSRalf Baechle  */
50384740dcSRalf Baechle #define CROSS_64KB(a, s) ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64)
51384740dcSRalf Baechle 
52384740dcSRalf Baechle #define EXTRA_FLOPPY_PARAMS
53384740dcSRalf Baechle 
54384740dcSRalf Baechle #include <floppy.h>
55384740dcSRalf Baechle 
56384740dcSRalf Baechle #endif /* _ASM_FLOPPY_H */
57