ide.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * linux/include/asm-m68k/ide.h
  3. *
  4. * Copyright (C) 1994-1996 Linus Torvalds & authors
  5. */
  6. /* Copyright(c) 1996 Kars de Jong */
  7. /* Based on the ide driver from 1.2.13pl8 */
  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. #ifndef _M68K_IDE_H
  27. #define _M68K_IDE_H
  28. #ifdef __KERNEL__
  29. #include <asm/setup.h>
  30. #include <asm/io.h>
  31. #include <asm/irq.h>
  32. #ifdef CONFIG_MAC
  33. #include <asm/macints.h>
  34. #endif
  35. /*
  36. * Get rid of defs from io.h - ide has its private and conflicting versions
  37. * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we
  38. * always use the `raw' MMIO versions
  39. */
  40. #undef inb
  41. #undef inw
  42. #undef insw
  43. #undef inl
  44. #undef insl
  45. #undef outb
  46. #undef outw
  47. #undef outsw
  48. #undef outl
  49. #undef outsl
  50. #undef readb
  51. #undef readw
  52. #undef readl
  53. #undef writeb
  54. #undef writew
  55. #undef writel
  56. #define inb in_8
  57. #define inw in_be16
  58. #define insw(port, addr, n) raw_insw((u16 *)port, addr, n)
  59. #define inl in_be32
  60. #define insl(port, addr, n) raw_insl((u32 *)port, addr, n)
  61. #define outb(val, port) out_8(port, val)
  62. #define outw(val, port) out_be16(port, val)
  63. #define outsw(port, addr, n) raw_outsw((u16 *)port, addr, n)
  64. #define outl(val, port) out_be32(port, val)
  65. #define outsl(port, addr, n) raw_outsl((u32 *)port, addr, n)
  66. #define readb in_8
  67. #define readw in_be16
  68. #define __ide_mm_insw(port, addr, n) raw_insw((u16 *)port, addr, n)
  69. #define readl in_be32
  70. #define __ide_mm_insl(port, addr, n) raw_insl((u32 *)port, addr, n)
  71. #define writeb(val, port) out_8(port, val)
  72. #define writew(val, port) out_be16(port, val)
  73. #define __ide_mm_outsw(port, addr, n) raw_outsw((u16 *)port, addr, n)
  74. #define writel(val, port) out_be32(port, val)
  75. #define __ide_mm_outsl(port, addr, n) raw_outsl((u32 *)port, addr, n)
  76. #if defined(CONFIG_ATARI) || defined(CONFIG_Q40)
  77. #define insw_swapw(port, addr, n) raw_insw_swapw((u16 *)port, addr, n)
  78. #define outsw_swapw(port, addr, n) raw_outsw_swapw((u16 *)port, addr, n)
  79. #endif
  80. #endif /* __KERNEL__ */
  81. #endif /* _M68K_IDE_H */