ide.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef _ASM_M32R_IDE_H
  2. #define _ASM_M32R_IDE_H
  3. /* $Id$ */
  4. /*
  5. * linux/include/asm-m32r/ide.h
  6. *
  7. * Copyright (C) 1994-1996 Linus Torvalds & authors
  8. */
  9. /*
  10. * This file contains the i386 architecture specific IDE code.
  11. */
  12. #ifdef __KERNEL__
  13. #include <linux/config.h>
  14. #ifndef MAX_HWIFS
  15. # ifdef CONFIG_BLK_DEV_IDEPCI
  16. #define MAX_HWIFS 10
  17. # else
  18. #define MAX_HWIFS 2
  19. # endif
  20. #endif
  21. #if defined(CONFIG_PLAT_M32700UT)
  22. #include <asm/irq.h>
  23. #include <asm/m32700ut/m32700ut_pld.h>
  24. #endif
  25. #define IDE_ARCH_OBSOLETE_DEFAULTS
  26. static __inline__ int ide_default_irq(unsigned long base)
  27. {
  28. switch (base) {
  29. #if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) || defined(CONFIG_PLAT_MAPPI3)
  30. case 0x1f0: return PLD_IRQ_CFIREQ;
  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. #define IDE_ARCH_OBSOLETE_INIT
  59. #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
  60. #ifdef CONFIG_BLK_DEV_IDEPCI
  61. #define ide_init_default_irq(base) (0)
  62. #else
  63. #define ide_init_default_irq(base) ide_default_irq(base)
  64. #endif
  65. #include <asm-generic/ide_iops.h>
  66. #endif /* __KERNEL__ */
  67. #endif /* _ASM_M32R_IDE_H */