ide.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef _ASM_M32R_IDE_H
  2. #define _ASM_M32R_IDE_H
  3. /*
  4. * linux/include/asm-m32r/ide.h
  5. *
  6. * Copyright (C) 1994-1996 Linus Torvalds & authors
  7. */
  8. /*
  9. * This file contains the i386 architecture specific IDE code.
  10. */
  11. #ifdef __KERNEL__
  12. #include <asm/m32r.h>
  13. #ifndef MAX_HWIFS
  14. # ifdef CONFIG_BLK_DEV_IDEPCI
  15. #define MAX_HWIFS 10
  16. # else
  17. #define MAX_HWIFS 2
  18. # endif
  19. #endif
  20. static __inline__ int ide_default_irq(unsigned long base)
  21. {
  22. switch (base) {
  23. #if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) \
  24. || defined(CONFIG_PLAT_OPSPUT)
  25. case 0x1f0: return PLD_IRQ_CFIREQ;
  26. default:
  27. return 0;
  28. #elif defined(CONFIG_PLAT_MAPPI3)
  29. case 0x1f0: return PLD_IRQ_CFIREQ;
  30. case 0x170: return PLD_IRQ_IDEIREQ;
  31. default:
  32. return 0;
  33. #else
  34. case 0x1f0: return 14;
  35. case 0x170: return 15;
  36. case 0x1e8: return 11;
  37. case 0x168: return 10;
  38. case 0x1e0: return 8;
  39. case 0x160: return 12;
  40. default:
  41. return 0;
  42. #endif
  43. }
  44. }
  45. static __inline__ unsigned long ide_default_io_base(int index)
  46. {
  47. switch (index) {
  48. case 0: return 0x1f0;
  49. case 1: return 0x170;
  50. case 2: return 0x1e8;
  51. case 3: return 0x168;
  52. case 4: return 0x1e0;
  53. case 5: return 0x160;
  54. default:
  55. return 0;
  56. }
  57. }
  58. #include <asm-generic/ide_iops.h>
  59. #endif /* __KERNEL__ */
  60. #endif /* _ASM_M32R_IDE_H */