ide.h 1.7 KB

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