ide.h 1002 B

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