xref: /original-bsd/sys/pmax/dev/if_lereg.h (revision 433e7553)
19885cf45Sralph /*-
2*433e7553Sbostic  * Copyright (c) 1992, 1993
3*433e7553Sbostic  *	The Regents of the University of California.  All rights reserved.
46c50d0f2Smckusick  *
56c50d0f2Smckusick  * This code is derived from software contributed to Berkeley by
69885cf45Sralph  * Ralph Campbell and Rick Macklem.
76c50d0f2Smckusick  *
86c50d0f2Smckusick  * %sccs.include.redist.c%
96c50d0f2Smckusick  *
10*433e7553Sbostic  *	@(#)if_lereg.h	8.1 (Berkeley) 06/10/93
116c50d0f2Smckusick  */
126c50d0f2Smckusick 
136c50d0f2Smckusick #define	LEMTU		1518
149885cf45Sralph #define	LEBLEN		1520	/* LEMTU up to a multiple of 16 */
156c50d0f2Smckusick #define	LEMINSIZE	60	/* should be 64 if mode DTCR is set */
166c50d0f2Smckusick #define	LERBUF		32
176c50d0f2Smckusick #define	LERBUFLOG2	5
186c50d0f2Smckusick #define	LE_RLEN		(LERBUFLOG2 << 13)
196c50d0f2Smckusick #define	LETBUF		8
206c50d0f2Smckusick #define	LETBUFLOG2	3
216c50d0f2Smckusick #define	LE_TLEN		(LETBUFLOG2 << 13)
226c50d0f2Smckusick 
236c50d0f2Smckusick /*
246c50d0f2Smckusick  * LANCE registers.
256c50d0f2Smckusick  */
266c50d0f2Smckusick struct lereg1 {
276c50d0f2Smckusick 	u_short	ler1_rdp;	/* data port */
286c50d0f2Smckusick 	short	pad0;
296c50d0f2Smckusick 	u_short	ler1_rap;	/* register select port */
306c50d0f2Smckusick 	short	pad1;
316c50d0f2Smckusick };
326c50d0f2Smckusick 
336c50d0f2Smckusick /*
3423f2f1b6Sralph  * This structure is overlayed on the network dual-port RAM.
359885cf45Sralph  * Currently 32 * 1520 receive plus 8 * 1520 transmit buffers plus
366c50d0f2Smckusick  * buffer descriptor rings.
379885cf45Sralph  * There are two variants of the structure, one for the Pmax/3min/maxine
389885cf45Sralph  * with 2 byte pads between entries and one for the 3max and turbochannel
399885cf45Sralph  * option densely packed.
406c50d0f2Smckusick  */
419885cf45Sralph struct	lermd {			/* +0x0020 */
429885cf45Sralph 	u_short	rmd0;
439885cf45Sralph 	u_short	rmd1;
449885cf45Sralph 	short	rmd2;
459885cf45Sralph 	u_short	rmd3;
469885cf45Sralph };
479885cf45Sralph 
489885cf45Sralph struct	letmd {			/* +0x0058 */
499885cf45Sralph 	u_short	tmd0;
509885cf45Sralph 	u_short	tmd1;
519885cf45Sralph 	short	tmd2;
529885cf45Sralph 	u_short	tmd3;
539885cf45Sralph };
549885cf45Sralph 
559885cf45Sralph struct	lermdpad {			/* +0x0020 */
569885cf45Sralph 	u_short	rmd0;
579885cf45Sralph 	short	pad0;
589885cf45Sralph 	u_short	rmd1;
599885cf45Sralph 	short	pad1;
609885cf45Sralph 	short	rmd2;
619885cf45Sralph 	short	pad2;
629885cf45Sralph 	u_short	rmd3;
639885cf45Sralph 	short	pad3;
649885cf45Sralph };
659885cf45Sralph 
669885cf45Sralph struct	letmdpad {			/* +0x0058 */
679885cf45Sralph 	u_short	tmd0;
689885cf45Sralph 	short	pad0;
699885cf45Sralph 	u_short	tmd1;
709885cf45Sralph 	short	pad1;
719885cf45Sralph 	short	tmd2;
729885cf45Sralph 	short	pad2;
739885cf45Sralph 	u_short	tmd3;
749885cf45Sralph 	short	pad3;
759885cf45Sralph };
769885cf45Sralph 
776c50d0f2Smckusick struct lereg2 {
786c50d0f2Smckusick 	/* init block */		/* CHIP address */
796c50d0f2Smckusick 	u_short	ler2_mode;		/* +0x0000 */
806c50d0f2Smckusick 	u_short	ler2_padr0;		/* +0x0002 */
816c50d0f2Smckusick 	u_short	ler2_padr1;		/* +0x0004 */
826c50d0f2Smckusick 	u_short	ler2_padr2;		/* +0x0006 */
836c50d0f2Smckusick 	u_short	ler2_ladrf0;		/* +0x0008 */
846c50d0f2Smckusick 	u_short	ler2_ladrf1;		/* +0x000A */
856c50d0f2Smckusick 	u_short	ler2_ladrf2;		/* +0x000C */
866c50d0f2Smckusick 	u_short	ler2_ladrf3;		/* +0x000E */
876c50d0f2Smckusick 	u_short	ler2_rdra;		/* +0x0010 */
886c50d0f2Smckusick 	u_short	ler2_rlen;		/* +0x0012 */
896c50d0f2Smckusick 	u_short	ler2_tdra;		/* +0x0014 */
906c50d0f2Smckusick 	u_short	ler2_tlen;		/* +0x0016 */
919885cf45Sralph 	short	pad0[4];		/* Pad to 16 shorts */
926c50d0f2Smckusick 	/* receive message descriptors */
939885cf45Sralph 	struct lermd ler2_rmd[LERBUF];
946c50d0f2Smckusick 	/* transmit message descriptors */
959885cf45Sralph 	struct letmd ler2_tmd[LETBUF];
969885cf45Sralph 	char	ler2_rbuf[LERBUF][LEBLEN]; /* +0x0060 */
979885cf45Sralph 	char	ler2_tbuf[LETBUF][LEBLEN]; /* +0x2FD0 */
986c50d0f2Smckusick };
996c50d0f2Smckusick 
1009885cf45Sralph struct lereg2pad {
1019885cf45Sralph 	/* init block */		/* CHIP address */
1029885cf45Sralph 	u_short	ler2_mode;		/* +0x0000 */
1039885cf45Sralph 	short	pad0;
1049885cf45Sralph 	u_short	ler2_padr0;		/* +0x0002 */
1059885cf45Sralph 	short	pad1;
1069885cf45Sralph 	u_short	ler2_padr1;		/* +0x0004 */
1079885cf45Sralph 	short	pad2;
1089885cf45Sralph 	u_short	ler2_padr2;		/* +0x0006 */
1099885cf45Sralph 	short	pad3;
1109885cf45Sralph 	u_short	ler2_ladrf0;		/* +0x0008 */
1119885cf45Sralph 	short	pad4;
1129885cf45Sralph 	u_short	ler2_ladrf1;		/* +0x000A */
1139885cf45Sralph 	short	pad5;
1149885cf45Sralph 	u_short	ler2_ladrf2;		/* +0x000C */
1159885cf45Sralph 	short	pad6;
1169885cf45Sralph 	u_short	ler2_ladrf3;		/* +0x000E */
1179885cf45Sralph 	short	pad7;
1189885cf45Sralph 	u_short	ler2_rdra;		/* +0x0010 */
1199885cf45Sralph 	short	pad8;
1209885cf45Sralph 	u_short	ler2_rlen;		/* +0x0012 */
1219885cf45Sralph 	short	pad9;
1229885cf45Sralph 	u_short	ler2_tdra;		/* +0x0014 */
1239885cf45Sralph 	short	pad10;
1249885cf45Sralph 	u_short	ler2_tlen;		/* +0x0016 */
1259885cf45Sralph 	short	pad11[9];		/* Pad to 32 shorts */
1269885cf45Sralph 	/* receive message descriptors */
1279885cf45Sralph 	struct lermdpad ler2_rmd[LERBUF];
1289885cf45Sralph 	/* transmit message descriptors */
1299885cf45Sralph 	struct letmdpad ler2_tmd[LETBUF];
1309885cf45Sralph 	short	ler2_rbuf[LERBUF][LEBLEN]; /* +0x0060 */
1319885cf45Sralph 	short	ler2_tbuf[LETBUF][LEBLEN]; /* +0x2FD0 */
1329885cf45Sralph };
1339885cf45Sralph 
1349885cf45Sralph /*
1359885cf45Sralph  * Now for some truly ugly macros to access the structure fields
1369885cf45Sralph  * padded/non-padded at runtime. (For once, a Pascal like record variant
1379885cf45Sralph  * would be nice to have.)
1389885cf45Sralph  */
1399885cf45Sralph #define	LER2_RMDADDR(p, i) \
1409885cf45Sralph 		(le->sc_ler2pad ? \
1419885cf45Sralph 		 (volatile void *)&(((struct lereg2pad *)(p))->ler2_rmd[(i)]) : \
1429885cf45Sralph 		 (volatile void *)&(((struct lereg2 *)(p))->ler2_rmd[(i)]))
1439885cf45Sralph 
1449885cf45Sralph #define	LER2_TMDADDR(p, i) \
1459885cf45Sralph 		((le->sc_ler2pad ? \
1469885cf45Sralph 		 (volatile void *)&(((struct lereg2pad *)(p))->ler2_tmd[(i)]) : \
1479885cf45Sralph 		 (volatile void *)&(((struct lereg2 *)(p))->ler2_tmd[(i)])))
1489885cf45Sralph 
1499885cf45Sralph #define	LER2_RBUFADDR(p, i) \
1509885cf45Sralph 		((le->sc_ler2pad ? \
1519885cf45Sralph 		 (volatile void *)(((struct lereg2pad *)(p))->ler2_rbuf[(i)]) : \
1529885cf45Sralph 		 (volatile void *)(((struct lereg2 *)(p))->ler2_rbuf[(i)])))
1539885cf45Sralph 
1549885cf45Sralph #define	LER2_TBUFADDR(p, i) \
1559885cf45Sralph 		((le->sc_ler2pad ? \
1569885cf45Sralph 		 (volatile void *)(((struct lereg2pad *)(p))->ler2_tbuf[(i)]) : \
1579885cf45Sralph 		 (volatile void *)(((struct lereg2 *)(p))->ler2_tbuf[(i)])))
1589885cf45Sralph 
1599885cf45Sralph #define LER2_mode(p, v) \
1609885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lereg2pad *)(p))->ler2_mode = (v)) : \
1619885cf45Sralph 	 (((volatile struct lereg2 *)(p))->ler2_mode = (v)))
1629885cf45Sralph #define	LER2V_mode(p) \
1639885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lereg2pad *)(p))->ler2_mode : \
1649885cf45Sralph 	 ((volatile struct lereg2 *)(p))->ler2_mode)
1659885cf45Sralph 
1669885cf45Sralph #define LER2_padr0(p, v) \
1679885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lereg2pad *)(p))->ler2_padr0 = (v)) : \
1689885cf45Sralph 	 (((volatile struct lereg2 *)(p))->ler2_padr0 = (v)))
1699885cf45Sralph #define	LER2V_padr0(p) \
1709885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lereg2pad *)(p))->ler2_padr0 : \
1719885cf45Sralph 	 ((volatile struct lereg2 *)(p))->ler2_padr0)
1729885cf45Sralph 
1739885cf45Sralph #define LER2_padr1(p, v) \
1749885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lereg2pad *)(p))->ler2_padr1 = (v)) : \
1759885cf45Sralph 	 (((volatile struct lereg2 *)(p))->ler2_padr1 = (v)))
1769885cf45Sralph #define	LER2V_padr1(p) \
1779885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lereg2pad *)(p))->ler2_padr1 : \
1789885cf45Sralph 	 ((volatile struct lereg2 *)(p))->ler2_padr1)
1799885cf45Sralph 
1809885cf45Sralph #define LER2_padr2(p, v) \
1819885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lereg2pad *)(p))->ler2_padr2 = (v)) : \
1829885cf45Sralph 	 (((volatile struct lereg2 *)(p))->ler2_padr2 = (v)))
1839885cf45Sralph #define	LER2V_padr2(p) \
1849885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lereg2pad *)(p))->ler2_padr2 : \
1859885cf45Sralph 	 ((volatile struct lereg2 *)(p))->ler2_padr2)
1869885cf45Sralph 
1879885cf45Sralph #define LER2_ladrf0(p, v) \
1889885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lereg2pad *)(p))->ler2_ladrf0 = (v)) : \
1899885cf45Sralph 	 (((volatile struct lereg2 *)(p))->ler2_ladrf0 = (v)))
1909885cf45Sralph #define	LER2V_ladrf0(p) \
1919885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lereg2pad *)(p))->ler2_ladrf0 : \
1929885cf45Sralph 	 ((volatile struct lereg2 *)(p))->ler2_ladrf0)
1939885cf45Sralph 
1949885cf45Sralph #define LER2_ladrf1(p, v) \
1959885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lereg2pad *)(p))->ler2_ladrf1 = (v)) : \
1969885cf45Sralph 	 (((volatile struct lereg2 *)(p))->ler2_ladrf1 = (v)))
1979885cf45Sralph #define	LER2V_ladrf1(p) \
1989885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lereg2pad *)(p))->ler2_ladrf1 : \
1999885cf45Sralph 	 ((volatile struct lereg2 *)(p))->ler2_ladrf1)
2009885cf45Sralph 
2019885cf45Sralph #define LER2_ladrf2(p, v) \
2029885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lereg2pad *)(p))->ler2_ladrf2 = (v)) : \
2039885cf45Sralph 	 (((volatile struct lereg2 *)(p))->ler2_ladrf2 = (v)))
2049885cf45Sralph #define	LER2V_ladrf2(p) \
2059885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lereg2pad *)(p))->ler2_ladrf2 : \
2069885cf45Sralph 	 ((volatile struct lereg2 *)(p))->ler2_ladrf2)
2079885cf45Sralph 
2089885cf45Sralph #define LER2_ladrf3(p, v) \
2099885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lereg2pad *)(p))->ler2_ladrf3 = (v)) : \
2109885cf45Sralph 	 (((volatile struct lereg2 *)(p))->ler2_ladrf3 = (v)))
2119885cf45Sralph #define	LER2V_ladrf3(p) \
2129885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lereg2pad *)(p))->ler2_ladrf3 : \
2139885cf45Sralph 	 ((volatile struct lereg2 *)(p))->ler2_ladrf3)
2149885cf45Sralph 
2159885cf45Sralph #define LER2_rdra(p, v) \
2169885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lereg2pad *)(p))->ler2_rdra = (v)) : \
2179885cf45Sralph 	 (((volatile struct lereg2 *)(p))->ler2_rdra = (v)))
2189885cf45Sralph #define	LER2V_rdra(p) \
2199885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lereg2pad *)(p))->ler2_rdra : \
2209885cf45Sralph 	 ((volatile struct lereg2 *)(p))->ler2_rdra)
2219885cf45Sralph 
2229885cf45Sralph #define LER2_rlen(p, v) \
2239885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lereg2pad *)(p))->ler2_rlen = (v)) : \
2249885cf45Sralph 	 (((volatile struct lereg2 *)(p))->ler2_rlen = (v)))
2259885cf45Sralph #define	LER2V_rlen(p) \
2269885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lereg2pad *)(p))->ler2_rlen : \
2279885cf45Sralph 	 ((volatile struct lereg2 *)(p))->ler2_rlen)
2289885cf45Sralph 
2299885cf45Sralph #define LER2_tdra(p, v) \
2309885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lereg2pad *)(p))->ler2_tdra = (v)) : \
2319885cf45Sralph 	 (((volatile struct lereg2 *)(p))->ler2_tdra = (v)))
2329885cf45Sralph #define	LER2V_tdra(p) \
2339885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lereg2pad *)(p))->ler2_tdra : \
2349885cf45Sralph 	 ((volatile struct lereg2 *)(p))->ler2_tdra)
2359885cf45Sralph 
2369885cf45Sralph #define LER2_tlen(p, v) \
2379885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lereg2pad *)(p))->ler2_tlen = (v)) : \
2389885cf45Sralph 	 (((volatile struct lereg2 *)(p))->ler2_tlen = (v)))
2399885cf45Sralph #define	LER2V_tlen(p) \
2409885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lereg2pad *)(p))->ler2_tlen : \
2419885cf45Sralph 	 ((volatile struct lereg2 *)(p))->ler2_tlen)
2429885cf45Sralph 
2439885cf45Sralph #define LER2_rmd0(p, v) \
2449885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lermdpad *)(p))->rmd0 = (v)) : \
2459885cf45Sralph 	 ((((volatile struct lermd *)(p))->rmd0 = (v))))
2469885cf45Sralph #define LER2V_rmd0(p) \
2479885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lermdpad *)(p))->rmd0 : \
2489885cf45Sralph 	 ((volatile struct lermd *)(p))->rmd0)
2499885cf45Sralph 
2509885cf45Sralph #define LER2_rmd1(p, v) \
2519885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lermdpad *)(p))->rmd1 = (v)) : \
2529885cf45Sralph 	 (((volatile struct lermd *)(p))->rmd1 = (v)))
2539885cf45Sralph #define LER2V_rmd1(p) \
2549885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lermdpad *)(p))->rmd1 : \
2559885cf45Sralph 	 ((volatile struct lermd *)(p))->rmd1)
2569885cf45Sralph 
2579885cf45Sralph #define LER2_rmd2(p, v) \
2589885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lermdpad *)(p))->rmd2 = (v)) : \
2599885cf45Sralph 	 (((volatile struct lermd *)(p))->rmd2 = (v)))
2609885cf45Sralph #define LER2V_rmd2(p) \
2619885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lermdpad *)(p))->rmd2 : \
2629885cf45Sralph 	 ((volatile struct lermd *)(p))->rmd2)
2639885cf45Sralph 
2649885cf45Sralph #define LER2_rmd3(p, v) \
2659885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct lermdpad *)(p))->rmd3 = (v)) : \
2669885cf45Sralph 	 (((volatile struct lermd *)(p))->rmd3 = (v)))
2679885cf45Sralph #define LER2V_rmd3(p) \
2689885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct lermdpad *)(p))->rmd3 : \
2699885cf45Sralph 	 ((volatile struct lermd *)(p))->rmd3)
2709885cf45Sralph 
2719885cf45Sralph #define LER2_tmd0(p, v) \
2729885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct letmdpad *)(p))->tmd0 = (v)) : \
2739885cf45Sralph 	 (((volatile struct letmd *)(p))->tmd0 = (v)))
2749885cf45Sralph #define LER2V_tmd0(p) \
2759885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct letmdpad *)(p))->tmd0 : \
2769885cf45Sralph 	 ((volatile struct letmd *)(p))->tmd0)
2779885cf45Sralph 
2789885cf45Sralph #define LER2_tmd1(p, v) \
2799885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct letmdpad *)(p))->tmd1 = (v)) : \
2809885cf45Sralph 	 (((volatile struct letmd *)(p))->tmd1 = (v)))
2819885cf45Sralph #define LER2V_tmd1(p) \
2829885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct letmdpad *)(p))->tmd1 : \
2839885cf45Sralph 	 ((volatile struct letmd *)(p))->tmd1)
2849885cf45Sralph 
2859885cf45Sralph #define LER2_tmd2(p, v) \
2869885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct letmdpad *)(p))->tmd2 = (v)) : \
2879885cf45Sralph 	 (((volatile struct letmd *)(p))->tmd2 = (v)))
2889885cf45Sralph #define LER2V_tmd2(p) \
2899885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct letmdpad *)(p))->tmd2 : \
2909885cf45Sralph 	 ((volatile struct letmd *)(p))->tmd2)
2919885cf45Sralph 
2929885cf45Sralph #define LER2_tmd3(p, v) \
2939885cf45Sralph 	(le->sc_ler2pad ? (((volatile struct letmdpad *)(p))->tmd3 = (v)) : \
2949885cf45Sralph 	 (((volatile struct letmd *)(p))->tmd3 = (v)))
2959885cf45Sralph #define LER2V_tmd3(p) \
2969885cf45Sralph 	(le->sc_ler2pad ? ((volatile struct letmdpad *)(p))->tmd3 : \
2979885cf45Sralph 	 ((volatile struct letmd *)(p))->tmd3)
2989885cf45Sralph 
2996c50d0f2Smckusick /*
3006c50d0f2Smckusick  * Control and status bits -- lereg0
3016c50d0f2Smckusick  */
3026c50d0f2Smckusick #define	LE_IE		0x80		/* interrupt enable */
3036c50d0f2Smckusick #define	LE_IR		0x40		/* interrupt requested */
3046c50d0f2Smckusick #define	LE_LOCK		0x08		/* lock status register */
3056c50d0f2Smckusick #define	LE_ACK		0x04		/* ack of lock */
3066c50d0f2Smckusick #define	LE_JAB		0x02		/* loss of tx clock (???) */
3076c50d0f2Smckusick #define LE_IPL(x)	((((x) >> 4) & 0x3) + 3)
3086c50d0f2Smckusick 
3096c50d0f2Smckusick /*
3106c50d0f2Smckusick  * Control and status bits -- lereg1
3116c50d0f2Smckusick  */
3126c50d0f2Smckusick #define	LE_CSR0		0
3136c50d0f2Smckusick #define	LE_CSR1		1
3146c50d0f2Smckusick #define	LE_CSR2		2
3156c50d0f2Smckusick #define	LE_CSR3		3
3166c50d0f2Smckusick 
3176c50d0f2Smckusick #define	LE_SERR		0x8000
3186c50d0f2Smckusick #define	LE_BABL		0x4000
3196c50d0f2Smckusick #define	LE_CERR		0x2000
3206c50d0f2Smckusick #define	LE_MISS		0x1000
3216c50d0f2Smckusick #define	LE_MERR		0x0800
3226c50d0f2Smckusick #define	LE_RINT		0x0400
3236c50d0f2Smckusick #define	LE_TINT		0x0200
3246c50d0f2Smckusick #define	LE_IDON		0x0100
3256c50d0f2Smckusick #define	LE_INTR		0x0080
3266c50d0f2Smckusick #define	LE_INEA		0x0040
3276c50d0f2Smckusick #define	LE_RXON		0x0020
3286c50d0f2Smckusick #define	LE_TXON		0x0010
3296c50d0f2Smckusick #define	LE_TDMD		0x0008
3306c50d0f2Smckusick #define	LE_STOP		0x0004
3316c50d0f2Smckusick #define	LE_STRT		0x0002
3326c50d0f2Smckusick #define	LE_INIT		0x0001
3336c50d0f2Smckusick 
3346c50d0f2Smckusick #define	LE_BSWP		0x4
3356c50d0f2Smckusick #define	LE_MODE		0x0
3366c50d0f2Smckusick 
3376c50d0f2Smckusick /*
3386c50d0f2Smckusick  * Control and status bits -- lereg2
3396c50d0f2Smckusick  */
3406c50d0f2Smckusick #define	LE_OWN		0x8000
3416c50d0f2Smckusick #define	LE_ERR		0x4000
3426c50d0f2Smckusick #define	LE_STP		0x0200
3436c50d0f2Smckusick #define	LE_ENP		0x0100
3446c50d0f2Smckusick 
3456c50d0f2Smckusick #define	LE_FRAM		0x2000
3466c50d0f2Smckusick #define	LE_OFLO		0x1000
3476c50d0f2Smckusick #define	LE_CRC		0x0800
3486c50d0f2Smckusick #define	LE_RBUFF	0x0400
3496c50d0f2Smckusick 
3506c50d0f2Smckusick #define	LE_MORE		0x1000
3516c50d0f2Smckusick #define	LE_ONE		0x0800
3526c50d0f2Smckusick #define	LE_DEF		0x0400
3536c50d0f2Smckusick 
3546c50d0f2Smckusick #define	LE_TBUFF	0x8000
3556c50d0f2Smckusick #define	LE_UFLO		0x4000
3566c50d0f2Smckusick #define	LE_LCOL		0x1000
3576c50d0f2Smckusick #define	LE_LCAR		0x0800
3586c50d0f2Smckusick #define	LE_RTRY		0x0400
359