ide.h 1.0 KB

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