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