mvme16xhw.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _M68K_MVME16xHW_H_
  3. #define _M68K_MVME16xHW_H_
  4. #include <asm/irq.h>
  5. typedef struct {
  6. u_char ack_icr,
  7. flt_icr,
  8. sel_icr,
  9. pe_icr,
  10. bsy_icr,
  11. spare1,
  12. isr,
  13. cr,
  14. spare2,
  15. spare3,
  16. spare4,
  17. data;
  18. } MVMElp, *MVMElpPtr;
  19. #define MVME_LPR_BASE 0xfff42030
  20. #define mvmelp ((*(volatile MVMElpPtr)(MVME_LPR_BASE)))
  21. typedef struct {
  22. unsigned char
  23. ctrl,
  24. bcd_sec,
  25. bcd_min,
  26. bcd_hr,
  27. bcd_dow,
  28. bcd_dom,
  29. bcd_mth,
  30. bcd_year;
  31. } MK48T08_t, *MK48T08ptr_t;
  32. #define RTC_WRITE 0x80
  33. #define RTC_READ 0x40
  34. #define RTC_STOP 0x20
  35. #define MVME_RTC_BASE 0xfffc1ff8
  36. #define MVME_I596_BASE 0xfff46000
  37. #define MVME_SCC_A_ADDR 0xfff45005
  38. #define MVME_SCC_B_ADDR 0xfff45001
  39. #define MVME_SCC_PCLK 10000000
  40. #define MVME162_IRQ_TYPE_PRIO 0
  41. #define MVME167_IRQ_PRN (IRQ_USER+20)
  42. #define MVME16x_IRQ_I596 (IRQ_USER+23)
  43. #define MVME16x_IRQ_SCSI (IRQ_USER+21)
  44. #define MVME16x_IRQ_FLY (IRQ_USER+63)
  45. #define MVME167_IRQ_SER_ERR (IRQ_USER+28)
  46. #define MVME167_IRQ_SER_MODEM (IRQ_USER+29)
  47. #define MVME167_IRQ_SER_TX (IRQ_USER+30)
  48. #define MVME167_IRQ_SER_RX (IRQ_USER+31)
  49. #define MVME16x_IRQ_TIMER (IRQ_USER+25)
  50. #define MVME167_IRQ_ABORT (IRQ_USER+46)
  51. #define MVME162_IRQ_ABORT (IRQ_USER+30)
  52. /* SCC interrupts, for MVME162 */
  53. #define MVME162_IRQ_SCC_BASE (IRQ_USER+0)
  54. #define MVME162_IRQ_SCCB_TX (IRQ_USER+0)
  55. #define MVME162_IRQ_SCCB_STAT (IRQ_USER+2)
  56. #define MVME162_IRQ_SCCB_RX (IRQ_USER+4)
  57. #define MVME162_IRQ_SCCB_SPCOND (IRQ_USER+6)
  58. #define MVME162_IRQ_SCCA_TX (IRQ_USER+8)
  59. #define MVME162_IRQ_SCCA_STAT (IRQ_USER+10)
  60. #define MVME162_IRQ_SCCA_RX (IRQ_USER+12)
  61. #define MVME162_IRQ_SCCA_SPCOND (IRQ_USER+14)
  62. /* MVME162 version register */
  63. #define MVME162_VERSION_REG 0xfff4202e
  64. extern unsigned short mvme16x_config;
  65. /* Lower 8 bits must match the revision register in the MC2 chip */
  66. #define MVME16x_CONFIG_SPEED_32 0x0001
  67. #define MVME16x_CONFIG_NO_VMECHIP2 0x0002
  68. #define MVME16x_CONFIG_NO_SCSICHIP 0x0004
  69. #define MVME16x_CONFIG_NO_ETHERNET 0x0008
  70. #define MVME16x_CONFIG_GOT_FPU 0x0010
  71. #define MVME16x_CONFIG_GOT_LP 0x0100
  72. #define MVME16x_CONFIG_GOT_CD2401 0x0200
  73. #define MVME16x_CONFIG_GOT_SCCA 0x0400
  74. #define MVME16x_CONFIG_GOT_SCCB 0x0800
  75. #endif