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