targethw.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. /******************************************************************************
  2. *
  3. * (C)Copyright 1998,1999 SysKonnect,
  4. * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * The information in this file is provided "AS IS" without warranty.
  12. *
  13. ******************************************************************************/
  14. #ifndef _TARGETHW_
  15. #define _TARGETHW_
  16. /*
  17. * PCI Watermark definition
  18. */
  19. #ifdef PCI
  20. #define RX_WATERMARK 24
  21. #define TX_WATERMARK 24
  22. #define SK_ML_ID_1 0x20
  23. #define SK_ML_ID_2 0x30
  24. #endif
  25. #include "h/skfbi.h"
  26. #ifndef TAG_MODE
  27. #include "h/fplus.h"
  28. #else
  29. #include "h/fplustm.h"
  30. #endif
  31. #ifndef HW_PTR
  32. #define HW_PTR void __iomem *
  33. #endif
  34. #ifdef MULT_OEM
  35. #define OI_STAT_LAST 0 /* end of OEM data base */
  36. #define OI_STAT_PRESENT 1 /* entry present but not empty */
  37. #define OI_STAT_VALID 2 /* holds valid ID, but is not active */
  38. #define OI_STAT_ACTIVE 3 /* holds valid ID, entry is active */
  39. /* active = adapter is supported */
  40. /* Memory representation of IDs must match representation in adapter. */
  41. struct s_oem_ids {
  42. u_char oi_status ; /* Stat: last, present, valid, active */
  43. u_char oi_mark[5] ; /* "PID00" .. "PID07" .. */
  44. u_char oi_id[4] ; /* id bytes, representation as */
  45. /* defined by hardware, */
  46. #ifdef PCI
  47. u_char oi_sub_id[4] ; /* sub id bytes, representation as */
  48. /* defined by hardware, */
  49. #endif
  50. #ifdef ISA
  51. u_char oi_logo_len ; /* the length of the adapter logo */
  52. u_char oi_logo[6] ; /* the adapter logo */
  53. u_char oi_reserved1 ;
  54. #endif /* ISA */
  55. } ;
  56. #endif /* MULT_OEM */
  57. struct s_smt_hw {
  58. /*
  59. * global
  60. */
  61. HW_PTR iop ; /* IO base address */
  62. short dma ; /* DMA channel */
  63. short irq ; /* IRQ level */
  64. short eprom ; /* FLASH prom */
  65. #ifndef PCI
  66. short DmaWriteExtraBytes ; /* add bytes for DMA write */
  67. #endif
  68. #ifndef SYNC
  69. u_short n_a_send ; /* pending send requests */
  70. #endif
  71. #if (defined(EISA) || defined(MCA) || defined(PCI))
  72. short slot ; /* slot number */
  73. short max_slots ; /* maximum number of slots */
  74. #endif
  75. #if (defined(PCI) || defined(MCA))
  76. short wdog_used ; /* TRUE if the watch dog is used */
  77. #endif
  78. #ifdef MCA
  79. short slot_32 ; /* 32bit slot (1) or 16bit slot (0) */
  80. short rev ; /* Board revision (FMx_REV). */
  81. short VFullRead ; /* V_full value for DMA read */
  82. short VFullWrite ; /* V_full value for DMA write */
  83. #endif
  84. #ifdef EISA
  85. short led ; /* LED for FE card */
  86. short dma_rmode ; /* read mode */
  87. short dma_wmode ; /* write mode */
  88. short dma_emode ; /* extend mode */
  89. /* DMA controller channel dependent io addresses */
  90. u_short dma_base_word_count ;
  91. u_short dma_base_address ;
  92. u_short dma_base_address_page ;
  93. #endif
  94. #ifdef PCI
  95. u_short pci_handle ; /* handle to access the BIOS func */
  96. u_long is_imask ; /* int maske for the int source reg */
  97. u_long phys_mem_addr ; /* physical memory address */
  98. u_short mc_dummy ; /* work around for MC compiler bug */
  99. /*
  100. * state of the hardware
  101. */
  102. u_short hw_state ; /* started or stopped */
  103. #define STARTED 1
  104. #define STOPPED 0
  105. int hw_is_64bit ; /* does we have a 64 bit adapter */
  106. #endif
  107. #ifdef TAG_MODE
  108. u_long pci_fix_value ; /* value parsed by PCIFIX */
  109. #endif
  110. /*
  111. * hwt.c
  112. */
  113. u_long t_start ; /* HWT start */
  114. u_long t_stop ; /* HWT stop */
  115. u_short timer_activ ; /* HWT timer active */
  116. /*
  117. * PIC
  118. */
  119. u_char pic_a1 ;
  120. u_char pic_21 ;
  121. /*
  122. * GENERIC ; do not modify beyond this line
  123. */
  124. /*
  125. * physical and canonical address
  126. */
  127. struct fddi_addr fddi_home_addr ;
  128. struct fddi_addr fddi_canon_addr ;
  129. struct fddi_addr fddi_phys_addr ;
  130. /*
  131. * mac variables
  132. */
  133. struct mac_parameter mac_pa ; /* tmin, tmax, tvx, treq .. */
  134. struct mac_counter mac_ct ; /* recv., lost, error */
  135. u_short mac_ring_is_up ; /* ring is up flag */
  136. struct s_smt_fp fp ; /* formac+ */
  137. #ifdef MULT_OEM
  138. struct s_oem_ids *oem_id ; /* pointer to selected id */
  139. int oem_min_status ; /* IDs to take care of */
  140. #endif /* MULT_OEM */
  141. } ;
  142. #endif