ide.h 1.6 KB

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