Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Architecture specific parts of the Floppy driver
0003  *
0004  * This file is subject to the terms and conditions of the GNU General Public
0005  * License.  See the file "COPYING" in the main directory of this archive
0006  * for more details.
0007  *
0008  * Copyright (C) 1995 - 2000 Ralf Baechle
0009  */
0010 #ifndef _ASM_FLOPPY_H
0011 #define _ASM_FLOPPY_H
0012 
0013 #include <asm/io.h>
0014 
0015 static inline void fd_cacheflush(char * addr, long size)
0016 {
0017     dma_cache_wback_inv((unsigned long)addr, size);
0018 }
0019 
0020 #define MAX_BUFFER_SECTORS 24
0021 
0022 
0023 /*
0024  * And on Mips's the CMOS info fails also ...
0025  *
0026  * FIXME: This information should come from the ARC configuration tree
0027  *    or wherever a particular machine has stored this ...
0028  */
0029 #define FLOPPY0_TYPE        fd_drive_type(0)
0030 #define FLOPPY1_TYPE        fd_drive_type(1)
0031 
0032 #define FDC1            fd_getfdaddr1()
0033 
0034 #define N_FDC 1         /* do you *really* want a second controller? */
0035 #define N_DRIVE 8
0036 
0037 /*
0038  * The DMA channel used by the floppy controller cannot access data at
0039  * addresses >= 16MB
0040  *
0041  * Went back to the 1MB limit, as some people had problems with the floppy
0042  * driver otherwise. It doesn't matter much for performance anyway, as most
0043  * floppy accesses go through the track buffer.
0044  *
0045  * On MIPSes using vdma, this actually means that *all* transfers go thru
0046  * the * track buffer since 0x1000000 is always smaller than KSEG0/1.
0047  * Actually this needs to be a bit more complicated since the so much different
0048  * hardware available with MIPS CPUs ...
0049  */
0050 #define CROSS_64KB(a, s) ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64)
0051 
0052 #define EXTRA_FLOPPY_PARAMS
0053 
0054 #include <floppy.h>
0055 
0056 #endif /* _ASM_FLOPPY_H */