if_tsec.h revision 298955
1176774Sraj/*- 2209908Sraj * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski 3176774Sraj * All rights reserved. 4176774Sraj * 5176774Sraj * Redistribution and use in source and binary forms, with or without 6176774Sraj * modification, are permitted provided that the following conditions 7176774Sraj * are met: 8176774Sraj * 1. Redistributions of source code must retain the above copyright 9176774Sraj * notice, this list of conditions and the following disclaimer. 10176774Sraj * 2. Redistributions in binary form must reproduce the above copyright 11176774Sraj * notice, this list of conditions and the following disclaimer in the 12176774Sraj * documentation and/or other materials provided with the distribution. 13176774Sraj * 14176774Sraj * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15176774Sraj * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16176774Sraj * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 17176774Sraj * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18176774Sraj * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 19176774Sraj * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20176774Sraj * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 21176774Sraj * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 22176774Sraj * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23176774Sraj * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24176774Sraj * 25176774Sraj * $FreeBSD: head/sys/dev/tsec/if_tsec.h 298955 2016-05-03 03:41:25Z pfg $ 26176774Sraj */ 27176774Sraj 28182189Sraj#ifndef _IF_TSEC_H 29182189Sraj#define _IF_TSEC_H 30182189Sraj 31209908Sraj#include <dev/ofw/openfirm.h> 32209908Sraj 33176774Sraj#define TSEC_RX_NUM_DESC 256 34176774Sraj#define TSEC_TX_NUM_DESC 256 35176774Sraj 36188711Sraj/* Interrupt Coalescing types */ 37188711Sraj#define TSEC_IC_RX 0 38188711Sraj#define TSEC_IC_TX 1 39188711Sraj 40188711Sraj/* eTSEC ID */ 41188711Sraj#define TSEC_ETSEC_ID 0x0124 42188711Sraj 43188711Sraj/* Frame sizes */ 44188711Sraj#define TSEC_MIN_FRAME_SIZE 64 45188711Sraj#define TSEC_MAX_FRAME_SIZE 9600 46188711Sraj 47176774Srajstruct tsec_softc { 48176774Sraj /* XXX MII bus requires that struct ifnet is first!!! */ 49176774Sraj struct ifnet *tsec_ifp; 50182189Sraj 51176774Sraj struct mtx transmit_lock; /* transmitter lock */ 52176774Sraj struct mtx receive_lock; /* receiver lock */ 53176774Sraj 54209908Sraj phandle_t node; 55176774Sraj device_t dev; 56176774Sraj device_t tsec_miibus; 57176774Sraj struct mii_data *tsec_mii; /* MII media control */ 58176774Sraj int tsec_link; 59176774Sraj 60176774Sraj bus_dma_tag_t tsec_tx_dtag; /* TX descriptors tag */ 61176774Sraj bus_dmamap_t tsec_tx_dmap; /* TX descriptors map */ 62176774Sraj struct tsec_desc *tsec_tx_vaddr;/* vadress of TX descriptors */ 63298955Spfg uint32_t tsec_tx_raddr; /* real address of TX descriptors */ 64176774Sraj 65176774Sraj bus_dma_tag_t tsec_rx_dtag; /* RX descriptors tag */ 66176774Sraj bus_dmamap_t tsec_rx_dmap; /* RX descriptors map */ 67176774Sraj struct tsec_desc *tsec_rx_vaddr; /* vadress of RX descriptors */ 68298955Spfg uint32_t tsec_rx_raddr; /* real address of RX descriptors */ 69176774Sraj 70176774Sraj bus_dma_tag_t tsec_tx_mtag; /* TX mbufs tag */ 71176774Sraj bus_dma_tag_t tsec_rx_mtag; /* TX mbufs tag */ 72176774Sraj 73176774Sraj struct rx_data_type { 74176774Sraj bus_dmamap_t map; /* mbuf map */ 75176774Sraj struct mbuf *mbuf; 76298955Spfg uint32_t paddr; /* DMA address of buffer */ 77176774Sraj } rx_data[TSEC_RX_NUM_DESC]; 78176774Sraj 79176774Sraj uint32_t tx_cur_desc_cnt; 80176774Sraj uint32_t tx_dirty_desc_cnt; 81176774Sraj uint32_t rx_cur_desc_cnt; 82176774Sraj 83176774Sraj struct resource *sc_rres; /* register resource */ 84176774Sraj int sc_rrid; /* register rid */ 85176774Sraj struct { 86176774Sraj bus_space_tag_t bst; 87176774Sraj bus_space_handle_t bsh; 88176774Sraj } sc_bas; 89176774Sraj 90176774Sraj struct resource *sc_transmit_ires; 91176774Sraj void *sc_transmit_ihand; 92176774Sraj int sc_transmit_irid; 93176774Sraj struct resource *sc_receive_ires; 94176774Sraj void *sc_receive_ihand; 95176774Sraj int sc_receive_irid; 96176774Sraj struct resource *sc_error_ires; 97176774Sraj void *sc_error_ihand; 98176774Sraj int sc_error_irid; 99176774Sraj 100176774Sraj int tsec_if_flags; 101188711Sraj int is_etsec; 102176774Sraj 103182187Sraj /* Watchdog and MII tick related */ 104182187Sraj struct callout tsec_callout; 105182187Sraj int tsec_watchdog; 106177111Sraj 107176774Sraj /* TX maps */ 108176774Sraj bus_dmamap_t tx_map_data[TSEC_TX_NUM_DESC]; 109176774Sraj 110176774Sraj /* unused TX maps data */ 111176774Sraj uint32_t tx_map_unused_get_cnt; 112176774Sraj uint32_t tx_map_unused_put_cnt; 113176774Sraj bus_dmamap_t *tx_map_unused_data[TSEC_TX_NUM_DESC]; 114176774Sraj 115176774Sraj /* used TX maps data */ 116176774Sraj uint32_t tx_map_used_get_cnt; 117176774Sraj uint32_t tx_map_used_put_cnt; 118176774Sraj bus_dmamap_t *tx_map_used_data[TSEC_TX_NUM_DESC]; 119182189Sraj 120176774Sraj /* mbufs in TX queue */ 121176774Sraj uint32_t tx_mbuf_used_get_cnt; 122176774Sraj uint32_t tx_mbuf_used_put_cnt; 123176774Sraj struct mbuf *tx_mbuf_used_data[TSEC_TX_NUM_DESC]; 124188711Sraj 125188711Sraj /* interrupt coalescing */ 126188711Sraj struct mtx ic_lock; 127188711Sraj uint32_t rx_ic_time; /* RW, valid values 0..65535 */ 128188711Sraj uint32_t rx_ic_count; /* RW, valid values 0..255 */ 129188711Sraj uint32_t tx_ic_time; 130188711Sraj uint32_t tx_ic_count; 131188711Sraj 132188711Sraj /* currently received frame */ 133188711Sraj struct mbuf *frame; 134209908Sraj 135209908Sraj int phyaddr; 136257993Snwhitehorn bus_space_tag_t phy_bst; 137257993Snwhitehorn bus_space_handle_t phy_bsh; 138176774Sraj}; 139176774Sraj 140176774Sraj/* interface to get/put generic objects */ 141176774Sraj#define TSEC_CNT_INIT(cnt, wrap) ((cnt) = ((wrap) - 1)) 142176774Sraj 143176774Sraj#define TSEC_INC(count, wrap) (count = ((count) + 1) & ((wrap) - 1)) 144176774Sraj 145176774Sraj#define TSEC_GET_GENERIC(hand, tab, count, wrap) \ 146176774Sraj ((hand)->tab[TSEC_INC((hand)->count, wrap)]) 147176774Sraj 148176774Sraj#define TSEC_PUT_GENERIC(hand, tab, count, wrap, val) \ 149176774Sraj ((hand)->tab[TSEC_INC((hand)->count, wrap)] = val) 150176774Sraj 151188712Sraj#define TSEC_BACK_GENERIC(sc, count, wrap) do { \ 152188712Sraj if ((sc)->count > 0) \ 153188712Sraj (sc)->count--; \ 154188712Sraj else \ 155188712Sraj (sc)->count = (wrap) - 1; \ 156176774Sraj} while (0) 157176774Sraj 158176774Sraj/* TX maps interface */ 159176774Sraj#define TSEC_TX_MAP_CNT_INIT(sc) do { \ 160176774Sraj TSEC_CNT_INIT((sc)->tx_map_unused_get_cnt, TSEC_TX_NUM_DESC); \ 161176774Sraj TSEC_CNT_INIT((sc)->tx_map_unused_put_cnt, TSEC_TX_NUM_DESC); \ 162176774Sraj TSEC_CNT_INIT((sc)->tx_map_used_get_cnt, TSEC_TX_NUM_DESC); \ 163176774Sraj TSEC_CNT_INIT((sc)->tx_map_used_put_cnt, TSEC_TX_NUM_DESC); \ 164176774Sraj} while (0) 165176774Sraj 166176774Sraj/* interface to get/put unused TX maps */ 167176774Sraj#define TSEC_ALLOC_TX_MAP(sc) \ 168176774Sraj TSEC_GET_GENERIC(sc, tx_map_unused_data, tx_map_unused_get_cnt, \ 169176774Sraj TSEC_TX_NUM_DESC) 170176774Sraj 171176774Sraj#define TSEC_FREE_TX_MAP(sc, val) \ 172176774Sraj TSEC_PUT_GENERIC(sc, tx_map_unused_data, tx_map_unused_put_cnt, \ 173176774Sraj TSEC_TX_NUM_DESC, val) 174176774Sraj 175176774Sraj/* interface to get/put used TX maps */ 176176774Sraj#define TSEC_GET_TX_MAP(sc) \ 177176774Sraj TSEC_GET_GENERIC(sc, tx_map_used_data, tx_map_used_get_cnt, \ 178176774Sraj TSEC_TX_NUM_DESC) 179176774Sraj 180176774Sraj#define TSEC_PUT_TX_MAP(sc, val) \ 181176774Sraj TSEC_PUT_GENERIC(sc, tx_map_used_data, tx_map_used_put_cnt, \ 182176774Sraj TSEC_TX_NUM_DESC, val) 183176774Sraj 184176774Sraj/* interface to get/put TX mbufs in send queue */ 185176774Sraj#define TSEC_TX_MBUF_CNT_INIT(sc) do { \ 186176774Sraj TSEC_CNT_INIT((sc)->tx_mbuf_used_get_cnt, TSEC_TX_NUM_DESC); \ 187176774Sraj TSEC_CNT_INIT((sc)->tx_mbuf_used_put_cnt, TSEC_TX_NUM_DESC); \ 188176774Sraj} while (0) 189176774Sraj 190176774Sraj#define TSEC_GET_TX_MBUF(sc) \ 191176774Sraj TSEC_GET_GENERIC(sc, tx_mbuf_used_data, tx_mbuf_used_get_cnt, \ 192176774Sraj TSEC_TX_NUM_DESC) 193176774Sraj 194176774Sraj#define TSEC_PUT_TX_MBUF(sc, val) \ 195176774Sraj TSEC_PUT_GENERIC(sc, tx_mbuf_used_data, tx_mbuf_used_put_cnt, \ 196176774Sraj TSEC_TX_NUM_DESC, val) 197176774Sraj 198176774Sraj#define TSEC_EMPTYQ_TX_MBUF(sc) \ 199176774Sraj ((sc)->tx_mbuf_used_get_cnt == (sc)->tx_mbuf_used_put_cnt) 200176774Sraj 201176774Sraj/* interface for manage tx tsec_desc */ 202176774Sraj#define TSEC_TX_DESC_CNT_INIT(sc) do { \ 203176774Sraj TSEC_CNT_INIT((sc)->tx_cur_desc_cnt, TSEC_TX_NUM_DESC); \ 204176774Sraj TSEC_CNT_INIT((sc)->tx_dirty_desc_cnt, TSEC_TX_NUM_DESC); \ 205176774Sraj} while (0) 206176774Sraj 207188712Sraj#define TSEC_GET_CUR_TX_DESC(sc) \ 208188712Sraj &TSEC_GET_GENERIC(sc, tsec_tx_vaddr, tx_cur_desc_cnt, \ 209176774Sraj TSEC_TX_NUM_DESC) 210176774Sraj 211188712Sraj#define TSEC_GET_DIRTY_TX_DESC(sc) \ 212188712Sraj &TSEC_GET_GENERIC(sc, tsec_tx_vaddr, tx_dirty_desc_cnt, \ 213176774Sraj TSEC_TX_NUM_DESC) 214176774Sraj 215176774Sraj#define TSEC_BACK_DIRTY_TX_DESC(sc) \ 216176774Sraj TSEC_BACK_GENERIC(sc, tx_dirty_desc_cnt, TSEC_TX_NUM_DESC) 217176774Sraj 218176774Sraj#define TSEC_CUR_DIFF_DIRTY_TX_DESC(sc) \ 219176774Sraj ((sc)->tx_cur_desc_cnt != (sc)->tx_dirty_desc_cnt) 220176774Sraj 221176774Sraj#define TSEC_FREE_TX_DESC(sc) \ 222176774Sraj (((sc)->tx_cur_desc_cnt < (sc)->tx_dirty_desc_cnt) ? \ 223176774Sraj ((sc)->tx_dirty_desc_cnt - (sc)->tx_cur_desc_cnt - 1) \ 224176774Sraj : \ 225176774Sraj (TSEC_TX_NUM_DESC - (sc)->tx_cur_desc_cnt \ 226176774Sraj + (sc)->tx_dirty_desc_cnt - 1)) 227176774Sraj 228176774Sraj/* interface for manage rx tsec_desc */ 229176774Sraj#define TSEC_RX_DESC_CNT_INIT(sc) do { \ 230176774Sraj TSEC_CNT_INIT((sc)->rx_cur_desc_cnt, TSEC_RX_NUM_DESC); \ 231176774Sraj} while (0) 232176774Sraj 233176774Sraj#define TSEC_GET_CUR_RX_DESC(sc) \ 234176774Sraj &TSEC_GET_GENERIC(sc, tsec_rx_vaddr, rx_cur_desc_cnt, \ 235176774Sraj TSEC_RX_NUM_DESC) 236176774Sraj 237176774Sraj#define TSEC_BACK_CUR_RX_DESC(sc) \ 238176774Sraj TSEC_BACK_GENERIC(sc, rx_cur_desc_cnt, TSEC_RX_NUM_DESC) 239176774Sraj 240176774Sraj#define TSEC_GET_CUR_RX_DESC_CNT(sc) \ 241176774Sraj ((sc)->rx_cur_desc_cnt) 242176774Sraj 243176774Sraj/* init all counters (for init only!) */ 244176774Sraj#define TSEC_TX_RX_COUNTERS_INIT(sc) do { \ 245176774Sraj TSEC_TX_MAP_CNT_INIT(sc); \ 246176774Sraj TSEC_TX_MBUF_CNT_INIT(sc); \ 247176774Sraj TSEC_TX_DESC_CNT_INIT(sc); \ 248176774Sraj TSEC_RX_DESC_CNT_INIT(sc); \ 249176774Sraj} while (0) 250176774Sraj 251176774Sraj/* read/write bus functions */ 252176774Sraj#define TSEC_READ(sc, reg) \ 253176774Sraj bus_space_read_4((sc)->sc_bas.bst, (sc)->sc_bas.bsh, (reg)) 254176774Sraj#define TSEC_WRITE(sc, reg, val) \ 255176774Sraj bus_space_write_4((sc)->sc_bas.bst, (sc)->sc_bas.bsh, (reg), (val)) 256176774Sraj 257257993Snwhitehornextern struct mtx tsec_phy_mtx; 258257993Snwhitehorn#define TSEC_PHY_LOCK(sc) mtx_lock(&tsec_phy_mtx) 259257993Snwhitehorn#define TSEC_PHY_UNLOCK(sc) mtx_unlock(&tsec_phy_mtx) 260257993Snwhitehorn#define TSEC_PHY_READ(sc, reg) \ 261257993Snwhitehorn bus_space_read_4((sc)->phy_bst, (sc)->phy_bsh, (reg)) 262257993Snwhitehorn#define TSEC_PHY_WRITE(sc, reg, val) \ 263257993Snwhitehorn bus_space_write_4((sc)->phy_bst, (sc)->phy_bsh, (reg), (val)) 264257993Snwhitehorn 265176774Sraj/* Lock for transmitter */ 266176774Sraj#define TSEC_TRANSMIT_LOCK(sc) do { \ 267176774Sraj mtx_assert(&(sc)->receive_lock, MA_NOTOWNED); \ 268176774Sraj mtx_lock(&(sc)->transmit_lock); \ 269176774Sraj} while (0) 270176774Sraj 271176774Sraj#define TSEC_TRANSMIT_UNLOCK(sc) mtx_unlock(&(sc)->transmit_lock) 272176774Sraj#define TSEC_TRANSMIT_LOCK_ASSERT(sc) mtx_assert(&(sc)->transmit_lock, MA_OWNED) 273176774Sraj 274176774Sraj/* Lock for receiver */ 275188711Sraj#define TSEC_RECEIVE_LOCK(sc) do { \ 276188711Sraj mtx_assert(&(sc)->transmit_lock, MA_NOTOWNED); \ 277188711Sraj mtx_lock(&(sc)->receive_lock); \ 278176774Sraj} while (0) 279176774Sraj 280176774Sraj#define TSEC_RECEIVE_UNLOCK(sc) mtx_unlock(&(sc)->receive_lock) 281176774Sraj#define TSEC_RECEIVE_LOCK_ASSERT(sc) mtx_assert(&(sc)->receive_lock, MA_OWNED) 282176774Sraj 283188711Sraj/* Lock for interrupts coalescing */ 284188711Sraj#define TSEC_IC_LOCK(sc) do { \ 285188711Sraj mtx_assert(&(sc)->ic_lock, MA_NOTOWNED); \ 286188711Sraj mtx_lock(&(sc)->ic_lock); \ 287188711Sraj} while (0) 288188711Sraj 289188711Sraj#define TSEC_IC_UNLOCK(sc) mtx_unlock(&(sc)->ic_lock) 290188711Sraj#define TSEC_IC_LOCK_ASSERT(sc) mtx_assert(&(sc)->ic_lock, MA_OWNED) 291188711Sraj 292176774Sraj/* Global tsec lock (with all locks) */ 293176774Sraj#define TSEC_GLOBAL_LOCK(sc) do { \ 294176774Sraj if ((mtx_owned(&(sc)->transmit_lock) ? 1 : 0) != \ 295176774Sraj (mtx_owned(&(sc)->receive_lock) ? 1 : 0)) { \ 296176774Sraj panic("tsec deadlock possibility detection!"); \ 297176774Sraj } \ 298176774Sraj mtx_lock(&(sc)->transmit_lock); \ 299176774Sraj mtx_lock(&(sc)->receive_lock); \ 300176774Sraj} while (0) 301176774Sraj 302176774Sraj#define TSEC_GLOBAL_UNLOCK(sc) do { \ 303176774Sraj TSEC_RECEIVE_UNLOCK(sc); \ 304176774Sraj TSEC_TRANSMIT_UNLOCK(sc); \ 305176774Sraj} while (0) 306176774Sraj 307176774Sraj#define TSEC_GLOBAL_LOCK_ASSERT(sc) do { \ 308176774Sraj TSEC_TRANSMIT_LOCK_ASSERT(sc); \ 309176774Sraj TSEC_RECEIVE_LOCK_ASSERT(sc); \ 310176774Sraj} while (0) 311176774Sraj 312176774Sraj/* From global to {transmit,receive} */ 313176774Sraj#define TSEC_GLOBAL_TO_TRANSMIT_LOCK(sc) do { \ 314176774Sraj mtx_unlock(&(sc)->receive_lock);\ 315176774Sraj} while (0) 316176774Sraj 317176774Sraj#define TSEC_GLOBAL_TO_RECEIVE_LOCK(sc) do { \ 318176774Sraj mtx_unlock(&(sc)->transmit_lock);\ 319176774Sraj} while (0) 320176774Sraj 321176774Srajstruct tsec_desc { 322188711Sraj volatile uint16_t flags; /* descriptor flags */ 323188711Sraj volatile uint16_t length; /* buffer length */ 324188711Sraj volatile uint32_t bufptr; /* buffer pointer */ 325176774Sraj}; 326176774Sraj 327176774Sraj#define TSEC_READ_RETRY 10000 328176774Sraj#define TSEC_READ_DELAY 100 329182189Sraj 330188711Sraj/* Structures and defines for TCP/IP Off-load */ 331188711Srajstruct tsec_tx_fcb { 332188711Sraj volatile uint16_t flags; 333188711Sraj volatile uint8_t l4_offset; 334188711Sraj volatile uint8_t l3_offset; 335188711Sraj volatile uint16_t ph_chsum; 336188711Sraj volatile uint16_t vlan; 337188711Sraj}; 338188711Sraj 339188711Srajstruct tsec_rx_fcb { 340188711Sraj volatile uint16_t flags; 341188711Sraj volatile uint8_t rq_index; 342188711Sraj volatile uint8_t protocol; 343188711Sraj volatile uint16_t unused; 344188711Sraj volatile uint16_t vlan; 345188711Sraj}; 346188711Sraj 347188711Sraj#define TSEC_CHECKSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) 348188711Sraj 349188711Sraj#define TSEC_TX_FCB_IP4 TSEC_TX_FCB_L3_IS_IP 350188711Sraj#define TSEC_TX_FCB_IP6 (TSEC_TX_FCB_L3_IS_IP | TSEC_TX_FCB_L3_IS_IP6) 351188711Sraj 352188711Sraj#define TSEC_TX_FCB_TCP TSEC_TX_FCB_L4_IS_TCP_UDP 353188711Sraj#define TSEC_TX_FCB_UDP (TSEC_TX_FCB_L4_IS_TCP_UDP | TSEC_TX_FCB_L4_IS_UDP) 354188711Sraj 355188711Sraj#define TSEC_RX_FCB_IP_CSUM_CHECKED(flags) \ 356188711Sraj ((flags & (TSEC_RX_FCB_IP_FOUND | TSEC_RX_FCB_IP6_FOUND | \ 357188711Sraj TSEC_RX_FCB_IP_CSUM | TSEC_RX_FCB_PARSE_ERROR)) \ 358188711Sraj == (TSEC_RX_FCB_IP_FOUND | TSEC_RX_FCB_IP_CSUM)) 359188711Sraj 360188711Sraj#define TSEC_RX_FCB_TCP_UDP_CSUM_CHECKED(flags) \ 361188711Sraj ((flags & (TSEC_RX_FCB_TCP_UDP_FOUND | TSEC_RX_FCB_TCP_UDP_CSUM \ 362188711Sraj | TSEC_RX_FCB_PARSE_ERROR)) \ 363188711Sraj == (TSEC_RX_FCB_TCP_UDP_FOUND | TSEC_RX_FCB_TCP_UDP_CSUM)) 364188711Sraj 365182189Sraj/* Prototypes */ 366182189Srajextern devclass_t tsec_devclass; 367182189Sraj 368182189Srajint tsec_attach(struct tsec_softc *sc); 369182189Srajint tsec_detach(struct tsec_softc *sc); 370182189Sraj 371182189Srajvoid tsec_error_intr(void *arg); 372182189Srajvoid tsec_receive_intr(void *arg); 373182189Srajvoid tsec_transmit_intr(void *arg); 374182189Sraj 375182189Srajint tsec_miibus_readreg(device_t dev, int phy, int reg); 376194101Srajint tsec_miibus_writereg(device_t dev, int phy, int reg, int value); 377182189Srajvoid tsec_miibus_statchg(device_t dev); 378182189Srajint tsec_resume(device_t dev); /* XXX */ 379194101Srajint tsec_shutdown(device_t dev); 380182189Srajint tsec_suspend(device_t dev); /* XXX */ 381182189Sraj 382182189Srajvoid tsec_get_hwaddr(struct tsec_softc *sc, uint8_t *addr); 383182189Sraj 384188712Sraj#endif /* _IF_TSEC_H */ 385