| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Architecture specific parts of the Floppy driver | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This file is subject to the terms and conditions of the GNU General Public | 
					
						
							|  |  |  |  * License.  See the file "COPYING" in the main directory of this archive | 
					
						
							|  |  |  |  * for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Copyright (C) 1995 - 2000 Ralf Baechle | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #ifndef _ASM_FLOPPY_H
 | 
					
						
							|  |  |  | #define _ASM_FLOPPY_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-10-11 23:46:03 +01:00
										 |  |  | #include <linux/dma-mapping.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | static inline void fd_cacheflush(char * addr, long size) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2007-10-11 23:46:03 +01:00
										 |  |  | 	dma_cache_sync(NULL, addr, size, DMA_BIDIRECTIONAL); | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define MAX_BUFFER_SECTORS 24
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  |  * And on Mips's the CMOS info fails also ... | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * FIXME: This information should come from the ARC configuration tree | 
					
						
							| 
									
										
										
										
											2013-01-22 12:59:30 +01:00
										 |  |  |  *	  or wherever a particular machine has stored this ... | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  |  */ | 
					
						
							| 
									
										
										
										
											2013-01-22 12:59:30 +01:00
										 |  |  | #define FLOPPY0_TYPE		fd_drive_type(0)
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | #define FLOPPY1_TYPE		fd_drive_type(1)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-07-14 15:07:13 +03:00
										 |  |  | #define FDC1			fd_getfdaddr1()
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | #define N_FDC 1			/* do you *really* want a second controller? */
 | 
					
						
							|  |  |  | #define N_DRIVE 8
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  |  * The DMA channel used by the floppy controller cannot access data at | 
					
						
							|  |  |  |  * addresses >= 16MB | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Went back to the 1MB limit, as some people had problems with the floppy | 
					
						
							|  |  |  |  * driver otherwise. It doesn't matter much for performance anyway, as most | 
					
						
							|  |  |  |  * floppy accesses go through the track buffer. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * On MIPSes using vdma, this actually means that *all* transfers go thru | 
					
						
							|  |  |  |  * the * track buffer since 0x1000000 is always smaller than KSEG0/1. | 
					
						
							|  |  |  |  * Actually this needs to be a bit more complicated since the so much different | 
					
						
							|  |  |  |  * hardware available with MIPS CPUs ... | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2007-10-11 23:46:15 +01:00
										 |  |  | #define CROSS_64KB(a, s) ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64)
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | #define EXTRA_FLOPPY_PARAMS
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <floppy.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif /* _ASM_FLOPPY_H */
 |