ide.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. #ifndef MAX_HWIFS
  14. #define MAX_HWIFS CONFIG_IDE_MAX_HWIFS
  15. #endif
  16. #define IDE_ARCH_OBSOLETE_DEFAULTS
  17. static inline int ide_default_irq(unsigned long base)
  18. {
  19. switch (base) {
  20. case 0x1f0: return 14;
  21. case 0x170: return 15;
  22. case 0x1e8: return 11;
  23. case 0x168: return 10;
  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. default:
  36. return 0;
  37. }
  38. }
  39. #define IDE_ARCH_OBSOLETE_INIT
  40. #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
  41. #ifdef CONFIG_PCI
  42. #define ide_init_default_irq(base) (0)
  43. #else
  44. #define ide_init_default_irq(base) ide_default_irq(base)
  45. #endif
  46. #include <asm-generic/ide_iops.h>
  47. #endif /* __KERNEL__ */
  48. #endif /* __ASMalpha_IDE_H */