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