ide.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #define IDE_ARCH_OBSOLETE_DEFAULTS
  14. static inline int ide_default_irq(unsigned long base)
  15. {
  16. switch (base) {
  17. case 0x1f0: return isa_irq_to_vector(14);
  18. case 0x170: return isa_irq_to_vector(15);
  19. case 0x1e8: return isa_irq_to_vector(11);
  20. case 0x168: return isa_irq_to_vector(10);
  21. case 0x1e0: return isa_irq_to_vector(8);
  22. case 0x160: return isa_irq_to_vector(12);
  23. default:
  24. return 0;
  25. }
  26. }
  27. static inline unsigned long ide_default_io_base(int index)
  28. {
  29. switch (index) {
  30. case 0: return 0x1f0;
  31. case 1: return 0x170;
  32. case 2: return 0x1e8;
  33. case 3: return 0x168;
  34. case 4: return 0x1e0;
  35. case 5: return 0x160;
  36. default:
  37. return 0;
  38. }
  39. }
  40. #define IDE_ARCH_OBSOLETE_INIT
  41. #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
  42. #ifdef CONFIG_PCI
  43. #define ide_init_default_irq(base) (0)
  44. #else
  45. #define ide_init_default_irq(base) ide_default_irq(base)
  46. #endif
  47. #include <asm-generic/ide_iops.h>
  48. #endif /* __KERNEL__ */
  49. #endif /* __ASM_IA64_IDE_H */