xref: /netbsd-src/sys/dev/pcmcia/if_xivar.h (revision 233f556c2e23eed8ab45275c5718a1f0efb8fe2b)
1*233f556cSriastradh /*	$NetBSD: if_xivar.h,v 1.9 2015/04/13 16:33:25 riastradh Exp $	*/
22d5fe6edSmycroft 
32d5fe6edSmycroft /*
42d5fe6edSmycroft  * Copyright (c) 2004 Charles M. Hannum.  All rights reserved.
52d5fe6edSmycroft  *
62d5fe6edSmycroft  * Redistribution and use in source and binary forms, with or without
72d5fe6edSmycroft  * modification, are permitted provided that the following conditions
82d5fe6edSmycroft  * are met:
92d5fe6edSmycroft  * 1. Redistributions of source code must retain the above copyright
102d5fe6edSmycroft  *    notice, this list of conditions and the following disclaimer.
112d5fe6edSmycroft  * 2. Redistributions in binary form must reproduce the above copyright
122d5fe6edSmycroft  *    notice, this list of conditions and the following disclaimer in the
132d5fe6edSmycroft  *    documentation and/or other materials provided with the distribution.
142d5fe6edSmycroft  * 3. All advertising materials mentioning features or use of this software
152d5fe6edSmycroft  *    must display the following acknowledgement:
162d5fe6edSmycroft  *      This product includes software developed by Charles M. Hannum.
172d5fe6edSmycroft  * 4. The name of the author may not be used to endorse or promote products
182d5fe6edSmycroft  *    derived from this software without specific prior written permission.
192d5fe6edSmycroft  */
202d5fe6edSmycroft 
21*233f556cSriastradh #include <sys/rndsource.h>
222d5fe6edSmycroft 
232d5fe6edSmycroft struct xi_softc {
240a9ae619Sdyoung 	device_t sc_dev;			/* Generic device info */
252d5fe6edSmycroft 	struct ethercom sc_ethercom;		/* Ethernet common part */
262d5fe6edSmycroft 
272d5fe6edSmycroft 	struct mii_data sc_mii;			/* MII media information */
282d5fe6edSmycroft 
292d5fe6edSmycroft 	bus_space_tag_t sc_bst;			/* Bus cookie */
302d5fe6edSmycroft 	bus_space_handle_t sc_bsh;		/* Bus I/O handle */
312d5fe6edSmycroft 
322d5fe6edSmycroft         /* Power management hooks and state. */
3318db93c7Sperry 	int	(*sc_enable)(struct xi_softc *);
3418db93c7Sperry 	void	(*sc_disable)(struct xi_softc *);
352d5fe6edSmycroft 	int	sc_enabled;
362d5fe6edSmycroft 
372d5fe6edSmycroft 	int		sc_chipset;		/* Chipset type */
382d5fe6edSmycroft #define	XI_CHIPSET_SCIPPER	0
392d5fe6edSmycroft #define	XI_CHIPSET_MOHAWK	1
402d5fe6edSmycroft #define	XI_CHIPSET_DINGO	2
412d5fe6edSmycroft 	u_int8_t	sc_rev;			/* Chip revision */
422d5fe6edSmycroft 
433afd44cfStls 	krndsource_t	sc_rnd_source;
442d5fe6edSmycroft };
452d5fe6edSmycroft 
4618db93c7Sperry void	xi_attach(struct xi_softc *, u_int8_t *);
477cf29912Scegger int	xi_detach(device_t, int);
487cf29912Scegger int	xi_activate(device_t, enum devact);
4918db93c7Sperry int	xi_intr(void *);
50