mvme147hw.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. #ifndef _MVME147HW_H_
  2. #define _MVME147HW_H_
  3. #include <asm/irq.h>
  4. typedef struct {
  5. unsigned char
  6. ctrl,
  7. bcd_sec,
  8. bcd_min,
  9. bcd_hr,
  10. bcd_dow,
  11. bcd_dom,
  12. bcd_mth,
  13. bcd_year;
  14. } MK48T02;
  15. #define RTC_WRITE 0x80
  16. #define RTC_READ 0x40
  17. #define RTC_STOP 0x20
  18. #define m147_rtc ((MK48T02 * volatile)0xfffe07f8)
  19. struct pcc_regs {
  20. volatile u_long dma_tadr;
  21. volatile u_long dma_dadr;
  22. volatile u_long dma_bcr;
  23. volatile u_long dma_hr;
  24. volatile u_short t1_preload;
  25. volatile u_short t1_count;
  26. volatile u_short t2_preload;
  27. volatile u_short t2_count;
  28. volatile u_char t1_int_cntrl;
  29. volatile u_char t1_cntrl;
  30. volatile u_char t2_int_cntrl;
  31. volatile u_char t2_cntrl;
  32. volatile u_char ac_fail;
  33. volatile u_char watchdog;
  34. volatile u_char lpt_intr;
  35. volatile u_char lpt_cntrl;
  36. volatile u_char dma_intr;
  37. volatile u_char dma_cntrl;
  38. volatile u_char bus_error;
  39. volatile u_char dma_status;
  40. volatile u_char abort;
  41. volatile u_char ta_fnctl;
  42. volatile u_char serial_cntrl;
  43. volatile u_char general_cntrl;
  44. volatile u_char lan_cntrl;
  45. volatile u_char general_status;
  46. volatile u_char scsi_interrupt;
  47. volatile u_char slave;
  48. volatile u_char soft1_cntrl;
  49. volatile u_char int_base;
  50. volatile u_char soft2_cntrl;
  51. volatile u_char revision_level;
  52. volatile u_char lpt_data;
  53. volatile u_char lpt_status;
  54. };
  55. #define m147_pcc ((struct pcc_regs * volatile)0xfffe1000)
  56. #define PCC_INT_ENAB 0x08
  57. #define PCC_TIMER_INT_CLR 0x80
  58. #define PCC_TIMER_PRELOAD 63936l
  59. #define PCC_LEVEL_ABORT 0x07
  60. #define PCC_LEVEL_SERIAL 0x04
  61. #define PCC_LEVEL_ETH 0x04
  62. #define PCC_LEVEL_TIMER1 0x04
  63. #define PCC_LEVEL_SCSI_PORT 0x04
  64. #define PCC_LEVEL_SCSI_DMA 0x04
  65. #define PCC_IRQ_AC_FAIL (IRQ_USER+0)
  66. #define PCC_IRQ_BERR (IRQ_USER+1)
  67. #define PCC_IRQ_ABORT (IRQ_USER+2)
  68. /* #define PCC_IRQ_SERIAL (IRQ_USER+3) */
  69. #define PCC_IRQ_PRINTER (IRQ_USER+7)
  70. #define PCC_IRQ_TIMER1 (IRQ_USER+8)
  71. #define PCC_IRQ_TIMER2 (IRQ_USER+9)
  72. #define PCC_IRQ_SOFTWARE1 (IRQ_USER+10)
  73. #define PCC_IRQ_SOFTWARE2 (IRQ_USER+11)
  74. #define M147_SCC_A_ADDR 0xfffe3002
  75. #define M147_SCC_B_ADDR 0xfffe3000
  76. #define M147_SCC_PCLK 5000000
  77. #define MVME147_IRQ_SCSI_PORT (IRQ_USER+0x45)
  78. #define MVME147_IRQ_SCSI_DMA (IRQ_USER+0x46)
  79. /* SCC interrupts, for MVME147 */
  80. #define MVME147_IRQ_TYPE_PRIO 0
  81. #define MVME147_IRQ_SCC_BASE (IRQ_USER+32)
  82. #define MVME147_IRQ_SCCB_TX (IRQ_USER+32)
  83. #define MVME147_IRQ_SCCB_STAT (IRQ_USER+34)
  84. #define MVME147_IRQ_SCCB_RX (IRQ_USER+36)
  85. #define MVME147_IRQ_SCCB_SPCOND (IRQ_USER+38)
  86. #define MVME147_IRQ_SCCA_TX (IRQ_USER+40)
  87. #define MVME147_IRQ_SCCA_STAT (IRQ_USER+42)
  88. #define MVME147_IRQ_SCCA_RX (IRQ_USER+44)
  89. #define MVME147_IRQ_SCCA_SPCOND (IRQ_USER+46)
  90. #define MVME147_LANCE_BASE 0xfffe1800
  91. #define MVME147_LANCE_IRQ (IRQ_USER+4)
  92. #define ETHERNET_ADDRESS 0xfffe0778
  93. #endif