157ba4c9bSIgal Liberman /*
257ba4c9bSIgal Liberman  * Copyright 2008-2015 Freescale Semiconductor Inc.
357ba4c9bSIgal Liberman  *
457ba4c9bSIgal Liberman  * Redistribution and use in source and binary forms, with or without
557ba4c9bSIgal Liberman  * modification, are permitted provided that the following conditions are met:
657ba4c9bSIgal Liberman  *     * Redistributions of source code must retain the above copyright
757ba4c9bSIgal Liberman  *       notice, this list of conditions and the following disclaimer.
857ba4c9bSIgal Liberman  *     * Redistributions in binary form must reproduce the above copyright
957ba4c9bSIgal Liberman  *       notice, this list of conditions and the following disclaimer in the
1057ba4c9bSIgal Liberman  *       documentation and/or other materials provided with the distribution.
1157ba4c9bSIgal Liberman  *     * Neither the name of Freescale Semiconductor nor the
1257ba4c9bSIgal Liberman  *       names of its contributors may be used to endorse or promote products
1357ba4c9bSIgal Liberman  *       derived from this software without specific prior written permission.
1457ba4c9bSIgal Liberman  *
1557ba4c9bSIgal Liberman  *
1657ba4c9bSIgal Liberman  * ALTERNATIVELY, this software may be distributed under the terms of the
1757ba4c9bSIgal Liberman  * GNU General Public License ("GPL") as published by the Free Software
1857ba4c9bSIgal Liberman  * Foundation, either version 2 of that License or (at your option) any
1957ba4c9bSIgal Liberman  * later version.
2057ba4c9bSIgal Liberman  *
2157ba4c9bSIgal Liberman  * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
2257ba4c9bSIgal Liberman  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2357ba4c9bSIgal Liberman  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2457ba4c9bSIgal Liberman  * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
2557ba4c9bSIgal Liberman  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2657ba4c9bSIgal Liberman  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2757ba4c9bSIgal Liberman  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2857ba4c9bSIgal Liberman  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2957ba4c9bSIgal Liberman  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3057ba4c9bSIgal Liberman  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3157ba4c9bSIgal Liberman  */
3257ba4c9bSIgal Liberman 
3357ba4c9bSIgal Liberman #ifndef __DTSEC_H
3457ba4c9bSIgal Liberman #define __DTSEC_H
3557ba4c9bSIgal Liberman 
3657ba4c9bSIgal Liberman #include "fman_mac.h"
3757ba4c9bSIgal Liberman 
3857ba4c9bSIgal Liberman struct fman_mac *dtsec_config(struct fman_mac_params *params);
3957ba4c9bSIgal Liberman int dtsec_set_promiscuous(struct fman_mac *dtsec, bool new_val);
4057ba4c9bSIgal Liberman int dtsec_modify_mac_address(struct fman_mac *dtsec, enet_addr_t *enet_addr);
4157ba4c9bSIgal Liberman int dtsec_adjust_link(struct fman_mac *dtsec,
4257ba4c9bSIgal Liberman 		      u16 speed);
4357ba4c9bSIgal Liberman int dtsec_restart_autoneg(struct fman_mac *dtsec);
4457ba4c9bSIgal Liberman int dtsec_cfg_max_frame_len(struct fman_mac *dtsec, u16 new_val);
4557ba4c9bSIgal Liberman int dtsec_cfg_pad_and_crc(struct fman_mac *dtsec, bool new_val);
4657ba4c9bSIgal Liberman int dtsec_enable(struct fman_mac *dtsec, enum comm_mode mode);
4757ba4c9bSIgal Liberman int dtsec_disable(struct fman_mac *dtsec, enum comm_mode mode);
4857ba4c9bSIgal Liberman int dtsec_init(struct fman_mac *dtsec);
4957ba4c9bSIgal Liberman int dtsec_free(struct fman_mac *dtsec);
5057ba4c9bSIgal Liberman int dtsec_accept_rx_pause_frames(struct fman_mac *dtsec, bool en);
5157ba4c9bSIgal Liberman int dtsec_set_tx_pause_frames(struct fman_mac *dtsec, u8 priority,
5257ba4c9bSIgal Liberman 			      u16 pause_time, u16 thresh_time);
5357ba4c9bSIgal Liberman int dtsec_set_exception(struct fman_mac *dtsec,
5457ba4c9bSIgal Liberman 			enum fman_mac_exceptions exception, bool enable);
5557ba4c9bSIgal Liberman int dtsec_add_hash_mac_address(struct fman_mac *dtsec, enet_addr_t *eth_addr);
5657ba4c9bSIgal Liberman int dtsec_del_hash_mac_address(struct fman_mac *dtsec, enet_addr_t *eth_addr);
5757ba4c9bSIgal Liberman int dtsec_get_version(struct fman_mac *dtsec, u32 *mac_version);
5857ba4c9bSIgal Liberman 
5957ba4c9bSIgal Liberman #endif /* __DTSEC_H */
60