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