Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * Copyright (C) 1994-1996 Linus Torvalds & authors |
| 3 | */ |
| 4 | |
| 5 | /* Copyright(c) 1996 Kars de Jong */ |
| 6 | /* Based on the ide driver from 1.2.13pl8 */ |
| 7 | |
| 8 | /* |
| 9 | * Credits (alphabetical): |
| 10 | * |
| 11 | * - Bjoern Brauel |
| 12 | * - Kars de Jong |
| 13 | * - Torsten Ebeling |
| 14 | * - Dwight Engen |
| 15 | * - Thorsten Floeck |
| 16 | * - Roman Hodek |
| 17 | * - Guenther Kelleter |
| 18 | * - Chris Lawrence |
| 19 | * - Michael Rausch |
| 20 | * - Christian Sauer |
| 21 | * - Michael Schmitz |
| 22 | * - Jes Soerensen |
| 23 | * - Michael Thurm |
| 24 | * - Geert Uytterhoeven |
| 25 | */ |
| 26 | |
| 27 | #ifndef _M68K_IDE_H |
| 28 | #define _M68K_IDE_H |
| 29 | |
| 30 | #ifdef __KERNEL__ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | #include <asm/setup.h> |
| 32 | #include <asm/io.h> |
| 33 | #include <asm/irq.h> |
| 34 | |
Jate Sujjavanich | dc6ae5e | 2010-06-07 11:39:30 -0400 | [diff] [blame] | 35 | #ifdef CONFIG_MMU |
| 36 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | /* |
| 38 | * Get rid of defs from io.h - ide has its private and conflicting versions |
| 39 | * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we |
| 40 | * always use the `raw' MMIO versions |
| 41 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | #undef readb |
| 43 | #undef readw |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | #undef writeb |
| 45 | #undef writew |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | #define readb in_8 |
| 48 | #define readw in_be16 |
| 49 | #define __ide_mm_insw(port, addr, n) raw_insw((u16 *)port, addr, n) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | #define __ide_mm_insl(port, addr, n) raw_insl((u32 *)port, addr, n) |
| 51 | #define writeb(val, port) out_8(port, val) |
| 52 | #define writew(val, port) out_be16(port, val) |
| 53 | #define __ide_mm_outsw(port, addr, n) raw_outsw((u16 *)port, addr, n) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | #define __ide_mm_outsl(port, addr, n) raw_outsl((u32 *)port, addr, n) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | |
Jate Sujjavanich | dc6ae5e | 2010-06-07 11:39:30 -0400 | [diff] [blame] | 56 | #else |
| 57 | |
| 58 | #define __ide_mm_insw(port, addr, n) io_insw((unsigned int)port, addr, n) |
| 59 | #define __ide_mm_insl(port, addr, n) io_insl((unsigned int)port, addr, n) |
| 60 | #define __ide_mm_outsw(port, addr, n) io_outsw((unsigned int)port, addr, n) |
| 61 | #define __ide_mm_outsl(port, addr, n) io_outsl((unsigned int)port, addr, n) |
| 62 | |
| 63 | #endif /* CONFIG_MMU */ |
| 64 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | #endif /* __KERNEL__ */ |
| 66 | #endif /* _M68K_IDE_H */ |