ide.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * linux/include/asm-ia64/ide.h
  3. *
  4. * Copyright (C) 1994-1996 Linus Torvalds & authors
  5. */
  6. /*
  7. * This file contains the ia64 architecture specific IDE code.
  8. */
  9. #ifndef __ASM_IA64_IDE_H
  10. #define __ASM_IA64_IDE_H
  11. #ifdef __KERNEL__
  12. #include <linux/config.h>
  13. #include <linux/irq.h>
  14. #define IDE_ARCH_OBSOLETE_DEFAULTS
  15. static inline int ide_default_irq(unsigned long base)
  16. {
  17. switch (base) {
  18. case 0x1f0: return isa_irq_to_vector(14);
  19. case 0x170: return isa_irq_to_vector(15);
  20. case 0x1e8: return isa_irq_to_vector(11);
  21. case 0x168: return isa_irq_to_vector(10);
  22. case 0x1e0: return isa_irq_to_vector(8);
  23. case 0x160: return isa_irq_to_vector(12);
  24. default:
  25. return 0;
  26. }
  27. }
  28. static inline unsigned long ide_default_io_base(int index)
  29. {
  30. switch (index) {
  31. case 0: return 0x1f0;
  32. case 1: return 0x170;
  33. case 2: return 0x1e8;
  34. case 3: return 0x168;
  35. case 4: return 0x1e0;
  36. case 5: return 0x160;
  37. default:
  38. return 0;
  39. }
  40. }
  41. #define IDE_ARCH_OBSOLETE_INIT
  42. #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
  43. #ifdef CONFIG_PCI
  44. #define ide_init_default_irq(base) (0)
  45. #else
  46. #define ide_init_default_irq(base) ide_default_irq(base)
  47. #endif
  48. #include <asm-generic/ide_iops.h>
  49. #endif /* __KERNEL__ */
  50. #endif /* __ASM_IA64_IDE_H */