bkm_ax.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /* $Id: bkm_ax.h,v 1.5.6.3 2001/09/23 22:24:46 kai Exp $
  2. *
  3. * low level decls for T-Berkom cards A4T and Scitel Quadro (4*S0, passive)
  4. *
  5. * Author Roland Klabunde
  6. * Copyright by Roland Klabunde <R.Klabunde@Berkom.de>
  7. *
  8. * This software may be used and distributed according to the terms
  9. * of the GNU General Public License, incorporated herein by reference.
  10. *
  11. */
  12. #ifndef __BKM_AX_H__
  13. #define __BKM_AX_H__
  14. /* Supported boards (subtypes) */
  15. #define SCT_1 1
  16. #define SCT_2 2
  17. #define SCT_3 3
  18. #define SCT_4 4
  19. #define BKM_A4T 5
  20. #define PLX_ADDR_PLX 0x14 /* Addr PLX configuration */
  21. #define PLX_ADDR_ISAC 0x18 /* Addr ISAC */
  22. #define PLX_ADDR_HSCX 0x1C /* Addr HSCX */
  23. #define PLX_ADDR_ALE 0x20 /* Addr ALE */
  24. #define PLX_ADDR_ALEPLUS 0x24 /* Next Addr behind ALE */
  25. #define PLX_SUBVEN 0x2C /* Offset SubVendor */
  26. #define PLX_SUBSYS 0x2E /* Offset SubSystem */
  27. /* Application specific registers I20 (Siemens SZB6120H) */
  28. typedef struct {
  29. /* Video front end horizontal configuration register */
  30. volatile u_int i20VFEHorzCfg; /* Offset 00 */
  31. /* Video front end vertical configuration register */
  32. volatile u_int i20VFEVertCfg; /* Offset 04 */
  33. /* Video front end scaler and pixel format register */
  34. volatile u_int i20VFEScaler; /* Offset 08 */
  35. /* Video display top register */
  36. volatile u_int i20VDispTop; /* Offset 0C */
  37. /* Video display bottom register */
  38. volatile u_int i20VDispBottom; /* Offset 10 */
  39. /* Video stride, status and frame grab register */
  40. volatile u_int i20VidFrameGrab;/* Offset 14 */
  41. /* Video display configuration register */
  42. volatile u_int i20VDispCfg; /* Offset 18 */
  43. /* Video masking map top */
  44. volatile u_int i20VMaskTop; /* Offset 1C */
  45. /* Video masking map bottom */
  46. volatile u_int i20VMaskBottom; /* Offset 20 */
  47. /* Overlay control register */
  48. volatile u_int i20OvlyControl; /* Offset 24 */
  49. /* System, PCI and general purpose pins control register */
  50. volatile u_int i20SysControl; /* Offset 28 */
  51. #define sysRESET 0x01000000 /* bit 24:Softreset (Low) */
  52. /* GPIO 4...0: Output fixed for our cfg! */
  53. #define sysCFG 0x000000E0 /* GPIO 7,6,5: Input */
  54. /* General purpose pins and guest bus control register */
  55. volatile u_int i20GuestControl;/* Offset 2C */
  56. #define guestWAIT_CFG 0x00005555 /* 4 PCI waits for all */
  57. #define guestISDN_INT_E 0x01000000 /* ISDN Int en (low) */
  58. #define guestVID_INT_E 0x02000000 /* Video interrupt en (low) */
  59. #define guestADI1_INT_R 0x04000000 /* ADI #1 int req (low) */
  60. #define guestADI2_INT_R 0x08000000 /* ADI #2 int req (low) */
  61. #define guestISDN_RES 0x10000000 /* ISDN reset bit (high) */
  62. #define guestADI1_INT_S 0x20000000 /* ADI #1 int pending (low) */
  63. #define guestADI2_INT_S 0x40000000 /* ADI #2 int pending (low) */
  64. #define guestISDN_INT_S 0x80000000 /* ISAC int pending (low) */
  65. #define g_A4T_JADE_RES 0x01000000 /* JADE Reset (High) */
  66. #define g_A4T_ISAR_RES 0x02000000 /* ISAR Reset (High) */
  67. #define g_A4T_ISAC_RES 0x04000000 /* ISAC Reset (High) */
  68. #define g_A4T_JADE_BOOTR 0x08000000 /* JADE enable boot SRAM (Low) NOT USED */
  69. #define g_A4T_ISAR_BOOTR 0x10000000 /* ISAR enable boot SRAM (Low) NOT USED */
  70. #define g_A4T_JADE_INT_S 0x20000000 /* JADE interrupt pnd (Low) */
  71. #define g_A4T_ISAR_INT_S 0x40000000 /* ISAR interrupt pnd (Low) */
  72. #define g_A4T_ISAC_INT_S 0x80000000 /* ISAC interrupt pnd (Low) */
  73. volatile u_int i20CodeSource; /* Offset 30 */
  74. volatile u_int i20CodeXferCtrl;/* Offset 34 */
  75. volatile u_int i20CodeMemPtr; /* Offset 38 */
  76. volatile u_int i20IntStatus; /* Offset 3C */
  77. volatile u_int i20IntCtrl; /* Offset 40 */
  78. #define intISDN 0x40000000 /* GIRQ1En (ISAC/ADI) (High) */
  79. #define intVID 0x20000000 /* GIRQ0En (VSYNC) (High) */
  80. #define intCOD 0x10000000 /* CodRepIrqEn (High) */
  81. #define intPCI 0x01000000 /* PCI IntA enable (High) */
  82. volatile u_int i20I2CCtrl; /* Offset 44 */
  83. } I20_REGISTER_FILE, *PI20_REGISTER_FILE;
  84. /*
  85. * Postoffice structure for A4T
  86. *
  87. */
  88. #define PO_OFFSET 0x00000200 /* Postoffice offset from base */
  89. #define GCS_0 0x00000000 /* Guest bus chip selects */
  90. #define GCS_1 0x00100000
  91. #define GCS_2 0x00200000
  92. #define GCS_3 0x00300000
  93. #define PO_READ 0x00000000 /* R/W from/to guest bus */
  94. #define PO_WRITE 0x00800000
  95. #define PO_PEND 0x02000000
  96. #define POSTOFFICE(postoffice) *(volatile unsigned int *)(postoffice)
  97. /* Wait unlimited (don't worry) */
  98. #define __WAITI20__(postoffice) \
  99. do { \
  100. while ((POSTOFFICE(postoffice) & PO_PEND)) ; \
  101. } while (0)
  102. #endif /* __BKM_AX_H__ */