Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /******************************************************************************
0003  *
0004  *  (C)Copyright 1998,1999 SysKonnect,
0005  *  a business unit of Schneider & Koch & Co. Datensysteme GmbH.
0006  *
0007  *  The information in this file is provided "AS IS" without warranty.
0008  *
0009  ******************************************************************************/
0010 
0011 #ifndef _TARGETHW_
0012 #define _TARGETHW_
0013 
0014     /*
0015      *  PCI Watermark definition
0016      */
0017 #ifdef  PCI
0018 #define RX_WATERMARK    24
0019 #define TX_WATERMARK    24
0020 #define SK_ML_ID_1  0x20
0021 #define SK_ML_ID_2  0x30
0022 #endif
0023 
0024 #include    "skfbi.h"
0025 #ifndef TAG_MODE    
0026 #include    "fplus.h"
0027 #else
0028 #include    "fplustm.h"
0029 #endif
0030 
0031 #ifndef HW_PTR
0032 #define HW_PTR  void __iomem *
0033 #endif
0034 
0035 #ifdef MULT_OEM
0036 #define OI_STAT_LAST        0   /* end of OEM data base */
0037 #define OI_STAT_PRESENT     1   /* entry present but not empty */
0038 #define OI_STAT_VALID       2   /* holds valid ID, but is not active */ 
0039 #define OI_STAT_ACTIVE      3   /* holds valid ID, entry is active */
0040                     /* active = adapter is supported */
0041 
0042 /* Memory representation of IDs must match representation in adapter. */
0043 struct  s_oem_ids {
0044     u_char  oi_status ;     /* Stat: last, present, valid, active */
0045     u_char  oi_mark[5] ;        /* "PID00" .. "PID07" ..    */
0046     u_char  oi_id[4] ;      /* id bytes, representation as  */
0047                     /* defined by hardware,     */  
0048 #ifdef PCI
0049     u_char  oi_sub_id[4] ;      /* sub id bytes, representation as */
0050                     /* defined by hardware,     */
0051 #endif
0052 } ;
0053 #endif  /* MULT_OEM */
0054 
0055 
0056 struct s_smt_hw {
0057     /*
0058      * global
0059      */
0060     HW_PTR  iop ;           /* IO base address */
0061     short   dma ;           /* DMA channel */
0062     short   irq ;           /* IRQ level */
0063     short   eprom ;         /* FLASH prom */
0064 
0065 #ifndef SYNC
0066     u_short n_a_send ;      /* pending send requests */
0067 #endif
0068 
0069 #if defined(PCI)
0070     short   slot ;          /* slot number */
0071     short   max_slots ;     /* maximum number of slots */
0072     short   wdog_used ;     /* TRUE if the watch dog is used */
0073 #endif
0074 
0075 #ifdef  PCI
0076     u_short pci_handle ;        /* handle to access the BIOS func */
0077     u_long  is_imask ;      /* int maske for the int source reg */
0078     u_long  phys_mem_addr ;     /* physical memory address */
0079     u_short mc_dummy ;      /* work around for MC compiler bug */   
0080     /*
0081      * state of the hardware
0082      */
0083     u_short hw_state ;      /* started or stopped */
0084 
0085 #define STARTED     1
0086 #define STOPPED     0
0087 
0088     int hw_is_64bit ;       /* does we have a 64 bit adapter */
0089 #endif
0090 
0091 #ifdef  TAG_MODE
0092     u_long  pci_fix_value ;     /* value parsed by PCIFIX */
0093 #endif
0094 
0095     /*
0096      * hwt.c
0097      */
0098     u_long  t_start ;       /* HWT start */
0099     u_long  t_stop ;        /* HWT stop */
0100     u_short timer_activ ;       /* HWT timer active */
0101 
0102     /*
0103      * PIC
0104      */
0105     u_char  pic_a1 ;
0106     u_char  pic_21 ;
0107 
0108     /*
0109      * GENERIC ; do not modify beyond this line
0110      */
0111 
0112     /*
0113      * physical and canonical address
0114      */
0115     struct fddi_addr fddi_home_addr ;
0116     struct fddi_addr fddi_canon_addr ;
0117     struct fddi_addr fddi_phys_addr ;
0118 
0119     /*
0120      * mac variables
0121      */
0122     struct mac_parameter mac_pa ;   /* tmin, tmax, tvx, treq .. */
0123     struct mac_counter mac_ct ; /* recv., lost, error  */
0124     u_short mac_ring_is_up ;    /* ring is up flag */
0125 
0126     struct s_smt_fp fp ;        /* formac+ */
0127 
0128 #ifdef MULT_OEM
0129     struct s_oem_ids *oem_id ;  /* pointer to selected id */
0130     int oem_min_status ;        /* IDs to take care of */
0131 #endif  /* MULT_OEM */
0132 
0133 } ;
0134 #endif