18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright 2008-2015 Freescale Semiconductor Inc. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or without 58c2ecf20Sopenharmony_ci * modification, are permitted provided that the following conditions are met: 68c2ecf20Sopenharmony_ci * * Redistributions of source code must retain the above copyright 78c2ecf20Sopenharmony_ci * notice, this list of conditions and the following disclaimer. 88c2ecf20Sopenharmony_ci * * Redistributions in binary form must reproduce the above copyright 98c2ecf20Sopenharmony_ci * notice, this list of conditions and the following disclaimer in the 108c2ecf20Sopenharmony_ci * documentation and/or other materials provided with the distribution. 118c2ecf20Sopenharmony_ci * * Neither the name of Freescale Semiconductor nor the 128c2ecf20Sopenharmony_ci * names of its contributors may be used to endorse or promote products 138c2ecf20Sopenharmony_ci * derived from this software without specific prior written permission. 148c2ecf20Sopenharmony_ci * 158c2ecf20Sopenharmony_ci * 168c2ecf20Sopenharmony_ci * ALTERNATIVELY, this software may be distributed under the terms of the 178c2ecf20Sopenharmony_ci * GNU General Public License ("GPL") as published by the Free Software 188c2ecf20Sopenharmony_ci * Foundation, either version 2 of that License or (at your option) any 198c2ecf20Sopenharmony_ci * later version. 208c2ecf20Sopenharmony_ci * 218c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY 228c2ecf20Sopenharmony_ci * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 238c2ecf20Sopenharmony_ci * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 248c2ecf20Sopenharmony_ci * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY 258c2ecf20Sopenharmony_ci * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 268c2ecf20Sopenharmony_ci * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 278c2ecf20Sopenharmony_ci * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 288c2ecf20Sopenharmony_ci * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 298c2ecf20Sopenharmony_ci * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 308c2ecf20Sopenharmony_ci * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 318c2ecf20Sopenharmony_ci */ 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#ifndef __TGEC_H 348c2ecf20Sopenharmony_ci#define __TGEC_H 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#include "fman_mac.h" 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_cistruct fman_mac *tgec_config(struct fman_mac_params *params); 398c2ecf20Sopenharmony_ciint tgec_set_promiscuous(struct fman_mac *tgec, bool new_val); 408c2ecf20Sopenharmony_ciint tgec_modify_mac_address(struct fman_mac *tgec, enet_addr_t *enet_addr); 418c2ecf20Sopenharmony_ciint tgec_cfg_max_frame_len(struct fman_mac *tgec, u16 new_val); 428c2ecf20Sopenharmony_ciint tgec_enable(struct fman_mac *tgec, enum comm_mode mode); 438c2ecf20Sopenharmony_ciint tgec_disable(struct fman_mac *tgec, enum comm_mode mode); 448c2ecf20Sopenharmony_ciint tgec_init(struct fman_mac *tgec); 458c2ecf20Sopenharmony_ciint tgec_free(struct fman_mac *tgec); 468c2ecf20Sopenharmony_ciint tgec_accept_rx_pause_frames(struct fman_mac *tgec, bool en); 478c2ecf20Sopenharmony_ciint tgec_set_tx_pause_frames(struct fman_mac *tgec, u8 priority, 488c2ecf20Sopenharmony_ci u16 pause_time, u16 thresh_time); 498c2ecf20Sopenharmony_ciint tgec_set_exception(struct fman_mac *tgec, 508c2ecf20Sopenharmony_ci enum fman_mac_exceptions exception, bool enable); 518c2ecf20Sopenharmony_ciint tgec_add_hash_mac_address(struct fman_mac *tgec, enet_addr_t *eth_addr); 528c2ecf20Sopenharmony_ciint tgec_del_hash_mac_address(struct fman_mac *tgec, enet_addr_t *eth_addr); 538c2ecf20Sopenharmony_ciint tgec_get_version(struct fman_mac *tgec, u32 *mac_version); 548c2ecf20Sopenharmony_ciint tgec_set_allmulti(struct fman_mac *tgec, bool enable); 558c2ecf20Sopenharmony_ciint tgec_set_tstamp(struct fman_mac *tgec, bool enable); 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#endif /* __TGEC_H */ 58