xref: /freebsd/sys/dev/dwc/dwc1000_core.h (revision 363b7c39fbad7c03f46e24bb4e435fad5cb56aa7)
162519d5aSEmmanuel Vadot /*-
262519d5aSEmmanuel Vadot  * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com>
362519d5aSEmmanuel Vadot  *
462519d5aSEmmanuel Vadot  * This software was developed by SRI International and the University of
562519d5aSEmmanuel Vadot  * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
662519d5aSEmmanuel Vadot  * ("CTSRD"), as part of the DARPA CRASH research programme.
762519d5aSEmmanuel Vadot  *
862519d5aSEmmanuel Vadot  * Redistribution and use in source and binary forms, with or without
962519d5aSEmmanuel Vadot  * modification, are permitted provided that the following conditions
1062519d5aSEmmanuel Vadot  * are met:
1162519d5aSEmmanuel Vadot  * 1. Redistributions of source code must retain the above copyright
1262519d5aSEmmanuel Vadot  *    notice, this list of conditions and the following disclaimer.
1362519d5aSEmmanuel Vadot  * 2. Redistributions in binary form must reproduce the above copyright
1462519d5aSEmmanuel Vadot  *    notice, this list of conditions and the following disclaimer in the
1562519d5aSEmmanuel Vadot  *    documentation and/or other materials provided with the distribution.
1662519d5aSEmmanuel Vadot  *
1762519d5aSEmmanuel Vadot  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1862519d5aSEmmanuel Vadot  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1962519d5aSEmmanuel Vadot  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2062519d5aSEmmanuel Vadot  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2162519d5aSEmmanuel Vadot  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2262519d5aSEmmanuel Vadot  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2362519d5aSEmmanuel Vadot  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2462519d5aSEmmanuel Vadot  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2562519d5aSEmmanuel Vadot  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2662519d5aSEmmanuel Vadot  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2762519d5aSEmmanuel Vadot  * SUCH DAMAGE.
2862519d5aSEmmanuel Vadot  */
2962519d5aSEmmanuel Vadot 
3062519d5aSEmmanuel Vadot #ifndef	__DWC1000_CORE_H__
3162519d5aSEmmanuel Vadot #define	 __DWC1000_CORE_H__
3262519d5aSEmmanuel Vadot 
3362519d5aSEmmanuel Vadot int dwc1000_miibus_read_reg(device_t dev, int phy, int reg);
3462519d5aSEmmanuel Vadot int dwc1000_miibus_write_reg(device_t dev, int phy, int reg, int val);
3562519d5aSEmmanuel Vadot void dwc1000_miibus_statchg(device_t dev);
3662519d5aSEmmanuel Vadot void dwc1000_core_setup(struct dwc_softc *sc);
37*363b7c39SEmmanuel Vadot int dwc1000_core_reset(struct dwc_softc *sc);
3862519d5aSEmmanuel Vadot void dwc1000_enable_mac(struct dwc_softc *sc, bool enable);
3962519d5aSEmmanuel Vadot void dwc1000_enable_csum_offload(struct dwc_softc *sc);
4062519d5aSEmmanuel Vadot void dwc1000_setup_rxfilter(struct dwc_softc *sc);
4162519d5aSEmmanuel Vadot void dwc1000_get_hwaddr(struct dwc_softc *sc, uint8_t *hwaddr);
4262519d5aSEmmanuel Vadot void dwc1000_harvest_stats(struct dwc_softc *sc);
4329776aa4SEmmanuel Vadot void dwc1000_intr(struct dwc_softc *softc);
4429776aa4SEmmanuel Vadot void dwc1000_intr_disable(struct dwc_softc *sc);
4562519d5aSEmmanuel Vadot 
4662519d5aSEmmanuel Vadot #endif	/* __DWC1000_CORE_H__ */
47