ide.h 1.4 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. static __inline__ int ide_default_irq(unsigned long base)
  14. {
  15. switch (base) {
  16. #if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) \
  17. || defined(CONFIG_PLAT_OPSPUT)
  18. case 0x1f0: return PLD_IRQ_CFIREQ;
  19. default:
  20. return 0;
  21. #elif defined(CONFIG_PLAT_MAPPI3)
  22. case 0x1f0: return PLD_IRQ_CFIREQ;
  23. case 0x170: return PLD_IRQ_IDEIREQ;
  24. default:
  25. return 0;
  26. #else
  27. case 0x1f0: return 14;
  28. case 0x170: return 15;
  29. case 0x1e8: return 11;
  30. case 0x168: return 10;
  31. case 0x1e0: return 8;
  32. case 0x160: return 12;
  33. default:
  34. return 0;
  35. #endif
  36. }
  37. }
  38. static __inline__ unsigned long ide_default_io_base(int index)
  39. {
  40. switch (index) {
  41. #if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) \
  42. || defined(CONFIG_PLAT_OPSPUT)
  43. case 0: return 0x1f0;
  44. #elif defined(CONFIG_PLAT_MAPPI3)
  45. case 0: return 0x1f0;
  46. case 1: return 0x170;
  47. #else
  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. #endif
  55. default:
  56. return 0;
  57. }
  58. }
  59. #include <asm-generic/ide_iops.h>
  60. #endif /* __KERNEL__ */
  61. #endif /* _ASM_M32R_IDE_H */