ide.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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/irq.h>
  13. static inline int ide_default_irq(unsigned long base)
  14. {
  15. switch (base) {
  16. case 0x1f0: return isa_irq_to_vector(14);
  17. case 0x170: return isa_irq_to_vector(15);
  18. case 0x1e8: return isa_irq_to_vector(11);
  19. case 0x168: return isa_irq_to_vector(10);
  20. case 0x1e0: return isa_irq_to_vector(8);
  21. case 0x160: return isa_irq_to_vector(12);
  22. default:
  23. return 0;
  24. }
  25. }
  26. static inline unsigned long ide_default_io_base(int index)
  27. {
  28. switch (index) {
  29. case 0: return 0x1f0;
  30. case 1: return 0x170;
  31. case 2: return 0x1e8;
  32. case 3: return 0x168;
  33. case 4: return 0x1e0;
  34. case 5: return 0x160;
  35. default:
  36. return 0;
  37. }
  38. }
  39. #include <asm-generic/ide_iops.h>
  40. #endif /* __KERNEL__ */
  41. #endif /* __ASM_IA64_IDE_H */