targethw.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /******************************************************************************
  3. *
  4. * (C)Copyright 1998,1999 SysKonnect,
  5. * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
  6. *
  7. * The information in this file is provided "AS IS" without warranty.
  8. *
  9. ******************************************************************************/
  10. #ifndef _TARGETHW_
  11. #define _TARGETHW_
  12. /*
  13. * PCI Watermark definition
  14. */
  15. #ifdef PCI
  16. #define RX_WATERMARK 24
  17. #define TX_WATERMARK 24
  18. #define SK_ML_ID_1 0x20
  19. #define SK_ML_ID_2 0x30
  20. #endif
  21. #include "skfbi.h"
  22. #ifndef TAG_MODE
  23. #include "fplus.h"
  24. #else
  25. #include "fplustm.h"
  26. #endif
  27. #ifndef HW_PTR
  28. #define HW_PTR void __iomem *
  29. #endif
  30. #ifdef MULT_OEM
  31. #define OI_STAT_LAST 0 /* end of OEM data base */
  32. #define OI_STAT_PRESENT 1 /* entry present but not empty */
  33. #define OI_STAT_VALID 2 /* holds valid ID, but is not active */
  34. #define OI_STAT_ACTIVE 3 /* holds valid ID, entry is active */
  35. /* active = adapter is supported */
  36. /* Memory representation of IDs must match representation in adapter. */
  37. struct s_oem_ids {
  38. u_char oi_status ; /* Stat: last, present, valid, active */
  39. u_char oi_mark[5] ; /* "PID00" .. "PID07" .. */
  40. u_char oi_id[4] ; /* id bytes, representation as */
  41. /* defined by hardware, */
  42. #ifdef PCI
  43. u_char oi_sub_id[4] ; /* sub id bytes, representation as */
  44. /* defined by hardware, */
  45. #endif
  46. } ;
  47. #endif /* MULT_OEM */
  48. struct s_smt_hw {
  49. /*
  50. * global
  51. */
  52. HW_PTR iop ; /* IO base address */
  53. short dma ; /* DMA channel */
  54. short irq ; /* IRQ level */
  55. short eprom ; /* FLASH prom */
  56. #ifndef SYNC
  57. u_short n_a_send ; /* pending send requests */
  58. #endif
  59. #if defined(PCI)
  60. short slot ; /* slot number */
  61. short max_slots ; /* maximum number of slots */
  62. short wdog_used ; /* TRUE if the watch dog is used */
  63. #endif
  64. #ifdef PCI
  65. u_short pci_handle ; /* handle to access the BIOS func */
  66. u_long is_imask ; /* int maske for the int source reg */
  67. u_long phys_mem_addr ; /* physical memory address */
  68. u_short mc_dummy ; /* work around for MC compiler bug */
  69. /*
  70. * state of the hardware
  71. */
  72. u_short hw_state ; /* started or stopped */
  73. #define STARTED 1
  74. #define STOPPED 0
  75. int hw_is_64bit ; /* does we have a 64 bit adapter */
  76. #endif
  77. #ifdef TAG_MODE
  78. u_long pci_fix_value ; /* value parsed by PCIFIX */
  79. #endif
  80. /*
  81. * hwt.c
  82. */
  83. u_long t_start ; /* HWT start */
  84. u_long t_stop ; /* HWT stop */
  85. u_short timer_activ ; /* HWT timer active */
  86. /*
  87. * PIC
  88. */
  89. u_char pic_a1 ;
  90. u_char pic_21 ;
  91. /*
  92. * GENERIC ; do not modify beyond this line
  93. */
  94. /*
  95. * physical and canonical address
  96. */
  97. struct fddi_addr fddi_home_addr ;
  98. struct fddi_addr fddi_canon_addr ;
  99. struct fddi_addr fddi_phys_addr ;
  100. /*
  101. * mac variables
  102. */
  103. struct mac_parameter mac_pa ; /* tmin, tmax, tvx, treq .. */
  104. struct mac_counter mac_ct ; /* recv., lost, error */
  105. u_short mac_ring_is_up ; /* ring is up flag */
  106. struct s_smt_fp fp ; /* formac+ */
  107. #ifdef MULT_OEM
  108. struct s_oem_ids *oem_id ; /* pointer to selected id */
  109. int oem_min_status ; /* IDs to take care of */
  110. #endif /* MULT_OEM */
  111. } ;
  112. #endif