mvme147hw.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:3k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

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