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 15 #ifndef _TARGETHW_ 16 #define _TARGETHW_ 17 18 /* 19 * PCI Watermark definition 20 */ 21 #ifdef PCI 22 #define RX_WATERMARK 24 23 #define TX_WATERMARK 24 24 #define SK_ML_ID_1 0x20 25 #define SK_ML_ID_2 0x30 26 #endif 27 28 #include "h/skfbi.h" 29 #ifndef TAG_MODE 30 #include "h/fplus.h" 31 #else 32 #include "h/fplustm.h" 33 #endif 34 35 #ifndef HW_PTR 36 #ifdef MEM_MAPPED_IO 37 #define HW_PTR u_long 38 #else 39 #define HW_PTR u_short 40 #endif 41 #endif 42 43 #ifdef MULT_OEM 44 #define OI_STAT_LAST 0 /* end of OEM data base */ 45 #define OI_STAT_PRESENT 1 /* entry present but not empty */ 46 #define OI_STAT_VALID 2 /* holds valid ID, but is not active */ 47 #define OI_STAT_ACTIVE 3 /* holds valid ID, entry is active */ 48 /* active = adapter is supported */ 49 50 /* Memory representation of IDs must match representation in adapter. */ 51 struct s_oem_ids { 52 u_char oi_status ; /* Stat: last, present, valid, active */ 53 u_char oi_mark[5] ; /* "PID00" .. "PID07" .. */ 54 u_char oi_id[4] ; /* id bytes, representation as */ 55 /* defined by hardware, */ 56 #ifdef PCI 57 u_char oi_sub_id[4] ; /* sub id bytes, representation as */ 58 /* defined by hardware, */ 59 #endif 60 #ifdef ISA 61 u_char oi_logo_len ; /* the length of the adapter logo */ 62 u_char oi_logo[6] ; /* the adapter logo */ 63 u_char oi_reserved1 ; 64 #endif /* ISA */ 65 } ; 66 #endif /* MULT_OEM */ 67 68 69 struct s_smt_hw { 70 /* 71 * global 72 */ 73 HW_PTR iop ; /* IO base address */ 74 short dma ; /* DMA channel */ 75 short irq ; /* IRQ level */ 76 short eprom ; /* FLASH prom */ 77 #ifndef PCI 78 short DmaWriteExtraBytes ; /* add bytes for DMA write */ 79 #endif 80 81 #ifndef SYNC 82 u_short n_a_send ; /* pending send requests */ 83 #endif 84 85 #if (defined(EISA) || defined(MCA) || defined(PCI)) 86 short slot ; /* slot number */ 87 short max_slots ; /* maximum number of slots */ 88 #endif 89 90 #if (defined(PCI) || defined(MCA)) 91 short wdog_used ; /* TRUE if the watch dog is used */ 92 #endif 93 94 #ifdef MCA 95 short slot_32 ; /* 32bit slot (1) or 16bit slot (0) */ 96 short rev ; /* Board revision (FMx_REV). */ 97 short VFullRead ; /* V_full value for DMA read */ 98 short VFullWrite ; /* V_full value for DMA write */ 99 #endif 100 101 #ifdef EISA 102 short led ; /* LED for FE card */ 103 104 short dma_rmode ; /* read mode */ 105 short dma_wmode ; /* write mode */ 106 short dma_emode ; /* extend mode */ 107 108 /* DMA controller channel dependent io addresses */ 109 u_short dma_base_word_count ; 110 u_short dma_base_address ; 111 u_short dma_base_address_page ; 112 #endif 113 114 #ifdef PCI 115 u_short pci_handle ; /* handle to access the BIOS func */ 116 u_long is_imask ; /* int maske for the int source reg */ 117 u_long phys_mem_addr ; /* physical memory address */ 118 u_short mc_dummy ; /* work around for MC compiler bug */ 119 /* 120 * state of the hardware 121 */ 122 u_short hw_state ; /* started or stopped */ 123 124 #define STARTED 1 125 #define STOPPED 0 126 127 int hw_is_64bit ; /* does we have a 64 bit adapter */ 128 #endif 129 130 #ifdef TAG_MODE 131 u_long pci_fix_value ; /* value parsed by PCIFIX */ 132 #endif 133 134 /* 135 * hwt.c 136 */ 137 u_long t_start ; /* HWT start */ 138 u_long t_stop ; /* HWT stop */ 139 u_short timer_activ ; /* HWT timer active */ 140 141 /* 142 * PIC 143 */ 144 u_char pic_a1 ; 145 u_char pic_21 ; 146 147 /* 148 * GENERIC ; do not modify beyond this line 149 */ 150 151 /* 152 * physical and canonical address 153 */ 154 struct fddi_addr fddi_home_addr ; 155 struct fddi_addr fddi_canon_addr ; 156 struct fddi_addr fddi_phys_addr ; 157 158 /* 159 * mac variables 160 */ 161 struct mac_parameter mac_pa ; /* tmin, tmax, tvx, treq .. */ 162 struct mac_counter mac_ct ; /* recv., lost, error */ 163 u_short mac_ring_is_up ; /* ring is up flag */ 164 165 struct s_smt_fp fp ; /* formac+ */ 166 167 #ifdef MULT_OEM 168 struct s_oem_ids *oem_id ; /* pointer to selected id */ 169 int oem_min_status ; /* IDs to take care of */ 170 #endif /* MULT_OEM */ 171 172 } ; 173 #endif 174