Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 - 2000 Ralf Baechle |
| 9 | */ |
| 10 | #ifndef _ASM_FLOPPY_H |
| 11 | #define _ASM_FLOPPY_H |
| 12 | |
Ralf Baechle | 7ca16d2 | 2007-10-11 23:46:03 +0100 | [diff] [blame] | 13 | #include <linux/dma-mapping.h> |
| 14 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | static inline void fd_cacheflush(char * addr, long size) |
| 16 | { |
Ralf Baechle | 7ca16d2 | 2007-10-11 23:46:03 +0100 | [diff] [blame] | 17 | dma_cache_sync(NULL, addr, size, DMA_BIDIRECTIONAL); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | #define MAX_BUFFER_SECTORS 24 |
| 21 | |
| 22 | |
| 23 | /* |
| 24 | * And on Mips's the CMOS info fails also ... |
| 25 | * |
| 26 | * FIXME: This information should come from the ARC configuration tree |
| 27 | * or whereever a particular machine has stored this ... |
| 28 | */ |
| 29 | #define FLOPPY0_TYPE fd_drive_type(0) |
| 30 | #define FLOPPY1_TYPE fd_drive_type(1) |
| 31 | |
| 32 | #define FDC1 fd_getfdaddr1(); |
| 33 | |
| 34 | #define N_FDC 1 /* do you *really* want a second controller? */ |
| 35 | #define N_DRIVE 8 |
| 36 | |
| 37 | #define FLOPPY_MOTOR_MASK 0xf0 |
| 38 | |
| 39 | /* |
| 40 | * The DMA channel used by the floppy controller cannot access data at |
| 41 | * addresses >= 16MB |
| 42 | * |
| 43 | * Went back to the 1MB limit, as some people had problems with the floppy |
| 44 | * driver otherwise. It doesn't matter much for performance anyway, as most |
| 45 | * floppy accesses go through the track buffer. |
| 46 | * |
| 47 | * On MIPSes using vdma, this actually means that *all* transfers go thru |
| 48 | * the * track buffer since 0x1000000 is always smaller than KSEG0/1. |
| 49 | * Actually this needs to be a bit more complicated since the so much different |
| 50 | * hardware available with MIPS CPUs ... |
| 51 | */ |
Ralf Baechle | 21a151d | 2007-10-11 23:46:15 +0100 | [diff] [blame^] | 52 | #define CROSS_64KB(a, s) ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | |
| 54 | #define EXTRA_FLOPPY_PARAMS |
| 55 | |
| 56 | #include <floppy.h> |
| 57 | |
| 58 | #endif /* _ASM_FLOPPY_H */ |