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