1e5a5a436SSepherosa Ziehau /* 2e5a5a436SSepherosa Ziehau * Copyright (c) 1997, 1998 3e5a5a436SSepherosa Ziehau * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4e5a5a436SSepherosa Ziehau * 5e5a5a436SSepherosa Ziehau * Redistribution and use in source and binary forms, with or without 6e5a5a436SSepherosa Ziehau * modification, are permitted provided that the following conditions 7e5a5a436SSepherosa Ziehau * are met: 8e5a5a436SSepherosa Ziehau * 1. Redistributions of source code must retain the above copyright 9e5a5a436SSepherosa Ziehau * notice, this list of conditions and the following disclaimer. 10e5a5a436SSepherosa Ziehau * 2. Redistributions in binary form must reproduce the above copyright 11e5a5a436SSepherosa Ziehau * notice, this list of conditions and the following disclaimer in the 12e5a5a436SSepherosa Ziehau * documentation and/or other materials provided with the distribution. 13e5a5a436SSepherosa Ziehau * 3. All advertising materials mentioning features or use of this software 14e5a5a436SSepherosa Ziehau * must display the following acknowledgement: 15e5a5a436SSepherosa Ziehau * This product includes software developed by Bill Paul. 16e5a5a436SSepherosa Ziehau * 4. Neither the name of the author nor the names of any co-contributors 17e5a5a436SSepherosa Ziehau * may be used to endorse or promote products derived from this software 18e5a5a436SSepherosa Ziehau * without specific prior written permission. 19e5a5a436SSepherosa Ziehau * 20e5a5a436SSepherosa Ziehau * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND 21e5a5a436SSepherosa Ziehau * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22e5a5a436SSepherosa Ziehau * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23e5a5a436SSepherosa Ziehau * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD 24e5a5a436SSepherosa Ziehau * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25e5a5a436SSepherosa Ziehau * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26e5a5a436SSepherosa Ziehau * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27e5a5a436SSepherosa Ziehau * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28e5a5a436SSepherosa Ziehau * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29e5a5a436SSepherosa Ziehau * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30e5a5a436SSepherosa Ziehau * THE POSSIBILITY OF SUCH DAMAGE. 31e5a5a436SSepherosa Ziehau * 32e5a5a436SSepherosa Ziehau * $FreeBSD: src/sys/dev/re/if_rereg.h,v 1.14.2.1 2001/07/19 18:33:07 wpaul Exp $ 33e5a5a436SSepherosa Ziehau */ 34e5a5a436SSepherosa Ziehau 35e5a5a436SSepherosa Ziehau #ifndef _RE_DRAGONFLY_H_ 36e5a5a436SSepherosa Ziehau #define _RE_DRAGONFLY_H_ 37e5a5a436SSepherosa Ziehau 38e5a5a436SSepherosa Ziehau #define RE_INTRS_TIMER \ 39e5a5a436SSepherosa Ziehau ((RE_INTRS & ~(RE_ISR_TX_OK | RE_ISR_RX_OK | RE_ISR_RX_OVERRUN |\ 40e5a5a436SSepherosa Ziehau RE_ISR_PKT_UNDERRUN | RE_ISR_TDU)) | RE_ISR_PCS_TIMEOUT) 41e5a5a436SSepherosa Ziehau 42*e6e07291SSepherosa Ziehau /* cmac write/read MMIO register */ 43*e6e07291SSepherosa Ziehau #define RE_CMAC_WRITE_1(sc, reg, val) \ 44*e6e07291SSepherosa Ziehau bus_space_write_1(sc->re_cmac_tag, sc->re_cmac_handle, reg, val) 45*e6e07291SSepherosa Ziehau #define RE_CMAC_WRITE_2(sc, reg, val) \ 46*e6e07291SSepherosa Ziehau bus_space_write_2(sc->re_cmac_tag, sc->re_cmac_handle, reg, val) 47*e6e07291SSepherosa Ziehau #define RE_CMAC_WRITE_4(sc, reg, val) \ 48*e6e07291SSepherosa Ziehau bus_space_write_4(sc->re_cmac_tag, sc->re_cmac_handle, reg, val) 49*e6e07291SSepherosa Ziehau #define RE_CMAC_READ_1(sc, reg) \ 50*e6e07291SSepherosa Ziehau bus_space_read_1(sc->re_cmac_tag, sc->re_cmac_handle, reg) 51*e6e07291SSepherosa Ziehau #define RE_CMAC_READ_2(sc, reg) \ 52*e6e07291SSepherosa Ziehau bus_space_read_2(sc->re_cmac_tag, sc->re_cmac_handle, reg) 53*e6e07291SSepherosa Ziehau #define RE_CMAC_READ_4(sc, reg) \ 54*e6e07291SSepherosa Ziehau bus_space_read_4(sc->re_cmac_tag, sc->re_cmac_handle, reg) 55*e6e07291SSepherosa Ziehau 56e5a5a436SSepherosa Ziehau int rtl_check_mac_version(struct re_softc *); 57e5a5a436SSepherosa Ziehau void rtl_init_software_variable(struct re_softc *); 58e5a5a436SSepherosa Ziehau void rtl_exit_oob(struct re_softc *); 59e5a5a436SSepherosa Ziehau void rtl_hw_init(struct re_softc *); 60e5a5a436SSepherosa Ziehau void rtl_reset(struct re_softc *); 61e5a5a436SSepherosa Ziehau void rtl_get_hw_mac_address(struct re_softc *, u_int8_t *); 62e5a5a436SSepherosa Ziehau void rtl_phy_power_up(struct re_softc *); 63e5a5a436SSepherosa Ziehau void rtl_hw_phy_config(struct re_softc *); 64e5a5a436SSepherosa Ziehau void rtl_clrwol(struct re_softc *); 65e5a5a436SSepherosa Ziehau int rtl_ifmedia_upd(struct ifnet *); 66e5a5a436SSepherosa Ziehau void rtl_ifmedia_sts(struct ifnet *, struct ifmediareq *); 67e5a5a436SSepherosa Ziehau void rtl_stop(struct re_softc *); 68e5a5a436SSepherosa Ziehau u_int8_t rtl_link_ok(struct re_softc *); 69e5a5a436SSepherosa Ziehau void rtl_link_on_patch(struct re_softc *); 70e5a5a436SSepherosa Ziehau void rtl_set_eaddr(struct re_softc *); 71e5a5a436SSepherosa Ziehau void rtl_hw_start(struct re_softc *); 72e5a5a436SSepherosa Ziehau void rtl_set_rx_packet_filter(struct re_softc *); 73e5a5a436SSepherosa Ziehau void rtl_hw_d3_para(struct re_softc *); 74e5a5a436SSepherosa Ziehau void rtl_phy_power_down(struct re_softc *); 75*e6e07291SSepherosa Ziehau void rtl_cmac_unmap(struct re_softc *); 76e5a5a436SSepherosa Ziehau 77e5a5a436SSepherosa Ziehau #endif /* !_RE_DRAGONFLY_H_ */ 78