1*ce099b40Smartin /* $NetBSD: depcavar.h,v 1.6 2008/04/28 20:23:49 martin Exp $ */ 28cb7deb8Sthorpej 38cb7deb8Sthorpej /*- 48cb7deb8Sthorpej * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. 58cb7deb8Sthorpej * All rights reserved. 68cb7deb8Sthorpej * 78cb7deb8Sthorpej * This code is derived from software contributed to The NetBSD Foundation 88cb7deb8Sthorpej * by Charles M. Hannum and by Jason R. Thorpe of the Numerical Aerospace 98cb7deb8Sthorpej * Simulation Facility, NASA Ames Research Center. 108cb7deb8Sthorpej * 118cb7deb8Sthorpej * Redistribution and use in source and binary forms, with or without 128cb7deb8Sthorpej * modification, are permitted provided that the following conditions 138cb7deb8Sthorpej * are met: 148cb7deb8Sthorpej * 1. Redistributions of source code must retain the above copyright 158cb7deb8Sthorpej * notice, this list of conditions and the following disclaimer. 168cb7deb8Sthorpej * 2. Redistributions in binary form must reproduce the above copyright 178cb7deb8Sthorpej * notice, this list of conditions and the following disclaimer in the 188cb7deb8Sthorpej * documentation and/or other materials provided with the distribution. 198cb7deb8Sthorpej * 208cb7deb8Sthorpej * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 218cb7deb8Sthorpej * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 228cb7deb8Sthorpej * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 238cb7deb8Sthorpej * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 248cb7deb8Sthorpej * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 258cb7deb8Sthorpej * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 268cb7deb8Sthorpej * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 278cb7deb8Sthorpej * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 288cb7deb8Sthorpej * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 298cb7deb8Sthorpej * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 308cb7deb8Sthorpej * POSSIBILITY OF SUCH DAMAGE. 318cb7deb8Sthorpej */ 328cb7deb8Sthorpej 338cb7deb8Sthorpej /*- 348cb7deb8Sthorpej * Copyright (c) 1992, 1993 358cb7deb8Sthorpej * The Regents of the University of California. All rights reserved. 368cb7deb8Sthorpej * 378cb7deb8Sthorpej * This code is derived from software contributed to Berkeley by 388cb7deb8Sthorpej * Ralph Campbell and Rick Macklem. 398cb7deb8Sthorpej * 408cb7deb8Sthorpej * Redistribution and use in source and binary forms, with or without 418cb7deb8Sthorpej * modification, are permitted provided that the following conditions 428cb7deb8Sthorpej * are met: 438cb7deb8Sthorpej * 1. Redistributions of source code must retain the above copyright 448cb7deb8Sthorpej * notice, this list of conditions and the following disclaimer. 458cb7deb8Sthorpej * 2. Redistributions in binary form must reproduce the above copyright 468cb7deb8Sthorpej * notice, this list of conditions and the following disclaimer in the 478cb7deb8Sthorpej * documentation and/or other materials provided with the distribution. 48aad01611Sagc * 3. Neither the name of the University nor the names of its contributors 498cb7deb8Sthorpej * may be used to endorse or promote products derived from this software 508cb7deb8Sthorpej * without specific prior written permission. 518cb7deb8Sthorpej * 528cb7deb8Sthorpej * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 538cb7deb8Sthorpej * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 548cb7deb8Sthorpej * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 558cb7deb8Sthorpej * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 568cb7deb8Sthorpej * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 578cb7deb8Sthorpej * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 588cb7deb8Sthorpej * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 598cb7deb8Sthorpej * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 608cb7deb8Sthorpej * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 618cb7deb8Sthorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 628cb7deb8Sthorpej * SUCH DAMAGE. 638cb7deb8Sthorpej * 648cb7deb8Sthorpej * @(#)if_le.c 8.2 (Berkeley) 11/16/93 658cb7deb8Sthorpej */ 668cb7deb8Sthorpej 678cb7deb8Sthorpej struct depca_softc { 68d9941582Stsutsui device_t sc_dev; /* base device */ 698cb7deb8Sthorpej 708cb7deb8Sthorpej bus_space_tag_t sc_iot; 718cb7deb8Sthorpej bus_space_tag_t sc_memt; 728cb7deb8Sthorpej bus_space_handle_t sc_ioh; 738cb7deb8Sthorpej bus_space_handle_t sc_memh; 748cb7deb8Sthorpej 758cb7deb8Sthorpej bus_size_t sc_memsize; 768cb7deb8Sthorpej 778cb7deb8Sthorpej void *(*sc_intr_establish)(struct depca_softc *, struct lance_softc *); 788cb7deb8Sthorpej }; 798cb7deb8Sthorpej 808cb7deb8Sthorpej int depca_readprom(bus_space_tag_t, bus_space_handle_t, u_int8_t *); 818cb7deb8Sthorpej int depca_intredge(void *); 828cb7deb8Sthorpej 838cb7deb8Sthorpej void depca_wrcsr(struct lance_softc *, u_int16_t, u_int16_t); 848cb7deb8Sthorpej u_int16_t depca_rdcsr(struct lance_softc *, u_int16_t); 858cb7deb8Sthorpej 868cb7deb8Sthorpej void depca_attach(struct depca_softc *); 87