targethw.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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 "skfbi.h"
  26. #ifndef TAG_MODE
  27. #include "fplus.h"
  28. #else
  29. #include "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. } ;
  51. #endif /* MULT_OEM */
  52. struct s_smt_hw {
  53. /*
  54. * global
  55. */
  56. HW_PTR iop ; /* IO base address */
  57. short dma ; /* DMA channel */
  58. short irq ; /* IRQ level */
  59. short eprom ; /* FLASH prom */
  60. #ifndef SYNC
  61. u_short n_a_send ; /* pending send requests */
  62. #endif
  63. #if defined(PCI)
  64. short slot ; /* slot number */
  65. short max_slots ; /* maximum number of slots */
  66. short wdog_used ; /* TRUE if the watch dog is used */
  67. #endif
  68. #ifdef PCI
  69. u_short pci_handle ; /* handle to access the BIOS func */
  70. u_long is_imask ; /* int maske for the int source reg */
  71. u_long phys_mem_addr ; /* physical memory address */
  72. u_short mc_dummy ; /* work around for MC compiler bug */
  73. /*
  74. * state of the hardware
  75. */
  76. u_short hw_state ; /* started or stopped */
  77. #define STARTED 1
  78. #define STOPPED 0
  79. int hw_is_64bit ; /* does we have a 64 bit adapter */
  80. #endif
  81. #ifdef TAG_MODE
  82. u_long pci_fix_value ; /* value parsed by PCIFIX */
  83. #endif
  84. /*
  85. * hwt.c
  86. */
  87. u_long t_start ; /* HWT start */
  88. u_long t_stop ; /* HWT stop */
  89. u_short timer_activ ; /* HWT timer active */
  90. /*
  91. * PIC
  92. */
  93. u_char pic_a1 ;
  94. u_char pic_21 ;
  95. /*
  96. * GENERIC ; do not modify beyond this line
  97. */
  98. /*
  99. * physical and canonical address
  100. */
  101. struct fddi_addr fddi_home_addr ;
  102. struct fddi_addr fddi_canon_addr ;
  103. struct fddi_addr fddi_phys_addr ;
  104. /*
  105. * mac variables
  106. */
  107. struct mac_parameter mac_pa ; /* tmin, tmax, tvx, treq .. */
  108. struct mac_counter mac_ct ; /* recv., lost, error */
  109. u_short mac_ring_is_up ; /* ring is up flag */
  110. struct s_smt_fp fp ; /* formac+ */
  111. #ifdef MULT_OEM
  112. struct s_oem_ids *oem_id ; /* pointer to selected id */
  113. int oem_min_status ; /* IDs to take care of */
  114. #endif /* MULT_OEM */
  115. } ;
  116. #endif