1 1.3 perry /* $NetBSD: if_xivar.h,v 1.3 2005/02/04 02:10:45 perry Exp $ */ 2 1.1 mycroft 3 1.1 mycroft /* 4 1.1 mycroft * Copyright (c) 2004 Charles M. Hannum. All rights reserved. 5 1.1 mycroft * 6 1.1 mycroft * Redistribution and use in source and binary forms, with or without 7 1.1 mycroft * modification, are permitted provided that the following conditions 8 1.1 mycroft * are met: 9 1.1 mycroft * 1. Redistributions of source code must retain the above copyright 10 1.1 mycroft * notice, this list of conditions and the following disclaimer. 11 1.1 mycroft * 2. Redistributions in binary form must reproduce the above copyright 12 1.1 mycroft * notice, this list of conditions and the following disclaimer in the 13 1.1 mycroft * documentation and/or other materials provided with the distribution. 14 1.1 mycroft * 3. All advertising materials mentioning features or use of this software 15 1.1 mycroft * must display the following acknowledgement: 16 1.1 mycroft * This product includes software developed by Charles M. Hannum. 17 1.1 mycroft * 4. The name of the author may not be used to endorse or promote products 18 1.1 mycroft * derived from this software without specific prior written permission. 19 1.1 mycroft */ 20 1.1 mycroft 21 1.1 mycroft #include "rnd.h" 22 1.1 mycroft 23 1.1 mycroft #if NRND > 0 24 1.1 mycroft #include <sys/rnd.h> 25 1.1 mycroft #endif 26 1.1 mycroft 27 1.1 mycroft struct xi_softc { 28 1.1 mycroft struct device sc_dev; /* Generic device info */ 29 1.1 mycroft struct ethercom sc_ethercom; /* Ethernet common part */ 30 1.1 mycroft 31 1.1 mycroft struct mii_data sc_mii; /* MII media information */ 32 1.1 mycroft 33 1.1 mycroft bus_space_tag_t sc_bst; /* Bus cookie */ 34 1.1 mycroft bus_space_handle_t sc_bsh; /* Bus I/O handle */ 35 1.1 mycroft 36 1.1 mycroft /* Power management hooks and state. */ 37 1.3 perry int (*sc_enable)(struct xi_softc *); 38 1.3 perry void (*sc_disable)(struct xi_softc *); 39 1.1 mycroft int sc_enabled; 40 1.1 mycroft 41 1.1 mycroft int sc_chipset; /* Chipset type */ 42 1.1 mycroft #define XI_CHIPSET_SCIPPER 0 43 1.1 mycroft #define XI_CHIPSET_MOHAWK 1 44 1.1 mycroft #define XI_CHIPSET_DINGO 2 45 1.1 mycroft u_int8_t sc_rev; /* Chip revision */ 46 1.1 mycroft 47 1.1 mycroft #if NRND > 0 48 1.1 mycroft rndsource_element_t sc_rnd_source; 49 1.1 mycroft #endif 50 1.1 mycroft }; 51 1.1 mycroft 52 1.3 perry void xi_attach(struct xi_softc *, u_int8_t *); 53 1.3 perry int xi_detach(struct device *, int); 54 1.3 perry int xi_activate(struct device *, enum devact); 55 1.3 perry int xi_intr(void *); 56