bvme6000hw.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:3k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. #ifndef _M68K_BVME6000HW_H_
  2. #define _M68K_BVME6000HW_H_
  3. #include <asm/irq.h>
  4. /*
  5.  * PIT structure
  6.  */
  7. #define BVME_PIT_BASE 0xffa00000
  8. typedef struct {
  9. unsigned char
  10. pad_a[3], pgcr,
  11. pad_b[3], psrr,
  12. pad_c[3], paddr,
  13. pad_d[3], pbddr,
  14. pad_e[3], pcddr,
  15. pad_f[3], pivr,
  16. pad_g[3], pacr,
  17. pad_h[3], pbcr,
  18. pad_i[3], padr,
  19. pad_j[3], pbdr,
  20. pad_k[3], paar,
  21. pad_l[3], pbar,
  22. pad_m[3], pcdr,
  23. pad_n[3], psr,
  24. pad_o[3], res1,
  25. pad_p[3], res2,
  26. pad_q[3], tcr,
  27. pad_r[3], tivr,
  28. pad_s[3], res3,
  29. pad_t[3], cprh,
  30. pad_u[3], cprm,
  31. pad_v[3], cprl,
  32. pad_w[3], res4,
  33. pad_x[3], crh,
  34. pad_y[3], crm,
  35. pad_z[3], crl,
  36. pad_A[3], tsr,
  37. pad_B[3], res5;
  38. } PitRegs_t, *PitRegsPtr;
  39. #define bvmepit   ((*(volatile PitRegsPtr)(BVME_PIT_BASE)))
  40. #define BVME_RTC_BASE 0xff900000
  41. typedef struct {
  42. unsigned char
  43. pad_a[3], msr,
  44. pad_b[3], t0cr_rtmr,
  45. pad_c[3], t1cr_omr,
  46. pad_d[3], pfr_icr0,
  47. pad_e[3], irr_icr1,
  48. pad_f[3], bcd_tenms,
  49. pad_g[3], bcd_sec,
  50. pad_h[3], bcd_min,
  51. pad_i[3], bcd_hr,
  52. pad_j[3], bcd_dom,
  53. pad_k[3], bcd_mth,
  54. pad_l[3], bcd_year,
  55. pad_m[3], bcd_ujcc,
  56. pad_n[3], bcd_hjcc,
  57. pad_o[3], bcd_dow,
  58. pad_p[3], t0lsb,
  59. pad_q[3], t0msb,
  60. pad_r[3], t1lsb,
  61. pad_s[3], t1msb,
  62. pad_t[3], cmp_sec,
  63. pad_u[3], cmp_min,
  64. pad_v[3], cmp_hr,
  65. pad_w[3], cmp_dom,
  66. pad_x[3], cmp_mth,
  67. pad_y[3], cmp_dow,
  68. pad_z[3], sav_sec,
  69. pad_A[3], sav_min,
  70. pad_B[3], sav_hr,
  71. pad_C[3], sav_dom,
  72. pad_D[3], sav_mth,
  73. pad_E[3], ram,
  74. pad_F[3], test;
  75. } RtcRegs_t, *RtcPtr_t;
  76. #define BVME_I596_BASE 0xff100000
  77. #define BVME_ETHIRQ_REG 0xff20000b
  78. #define BVME_LOCAL_IRQ_STAT  0xff20000f
  79. #define BVME_ETHERR          0x02
  80. #define BVME_ABORT_STATUS    0x08
  81. #define BVME_NCR53C710_BASE 0xff000000
  82. #define BVME_SCC_A_ADDR 0xffb0000b
  83. #define BVME_SCC_B_ADDR 0xffb00003
  84. #define BVME_SCC_RTxC 7372800
  85. #define BVME_CONFIG_REG 0xff500003
  86. #define config_reg_ptr (volatile unsigned char *)BVME_CONFIG_REG
  87. #define BVME_CONFIG_SW1 0x08
  88. #define BVME_CONFIG_SW2 0x04
  89. #define BVME_CONFIG_SW3 0x02
  90. #define BVME_CONFIG_SW4 0x01
  91. #define BVME_IRQ_TYPE_PRIO 0
  92. #define BVME_IRQ_PRN 0x54
  93. #define BVME_IRQ_I596 0x1a
  94. #define BVME_IRQ_SCSI 0x1b
  95. #define BVME_IRQ_TIMER 0x59
  96. #define BVME_IRQ_RTC 0x1e
  97. #define BVME_IRQ_ABORT 0x1f
  98. /* SCC interrupts */
  99. #define BVME_IRQ_SCC_BASE 0x40
  100. #define BVME_IRQ_SCCB_TX 0x40
  101. #define BVME_IRQ_SCCB_STAT 0x42
  102. #define BVME_IRQ_SCCB_RX 0x44
  103. #define BVME_IRQ_SCCB_SPCOND 0x46
  104. #define BVME_IRQ_SCCA_TX 0x48
  105. #define BVME_IRQ_SCCA_STAT 0x4a
  106. #define BVME_IRQ_SCCA_RX 0x4c
  107. #define BVME_IRQ_SCCA_SPCOND 0x4e
  108. /* Address control registers */
  109. #define BVME_ACR_A32VBA 0xff400003
  110. #define BVME_ACR_A32MSK 0xff410003
  111. #define BVME_ACR_A24VBA 0xff420003
  112. #define BVME_ACR_A24MSK 0xff430003
  113. #define BVME_ACR_A16VBA 0xff440003
  114. #define BVME_ACR_A32LBA 0xff450003
  115. #define BVME_ACR_A24LBA 0xff460003
  116. #define BVME_ACR_ADDRCTL 0xff470003
  117. #define bvme_acr_a32vba *(volatile unsigned char *)BVME_ACR_A32VBA
  118. #define bvme_acr_a32msk *(volatile unsigned char *)BVME_ACR_A32MSK
  119. #define bvme_acr_a24vba *(volatile unsigned char *)BVME_ACR_A24VBA
  120. #define bvme_acr_a24msk *(volatile unsigned char *)BVME_ACR_A24MSK
  121. #define bvme_acr_a16vba *(volatile unsigned char *)BVME_ACR_A16VBA
  122. #define bvme_acr_a32lba *(volatile unsigned char *)BVME_ACR_A32LBA
  123. #define bvme_acr_a24lba *(volatile unsigned char *)BVME_ACR_A24LBA
  124. #define bvme_acr_addrctl *(volatile unsigned char *)BVME_ACR_ADDRCTL
  125. #endif