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 __MEMAC_H 3457ba4c9bSIgal Liberman #define __MEMAC_H 3557ba4c9bSIgal Liberman 3657ba4c9bSIgal Liberman #include "fman_mac.h" 3757ba4c9bSIgal Liberman 3857ba4c9bSIgal Liberman #include <linux/netdevice.h> 3957ba4c9bSIgal Liberman 4057ba4c9bSIgal Liberman struct fman_mac *memac_config(struct fman_mac_params *params); 4157ba4c9bSIgal Liberman int memac_set_promiscuous(struct fman_mac *memac, bool new_val); 4257ba4c9bSIgal Liberman int memac_modify_mac_address(struct fman_mac *memac, enet_addr_t *enet_addr); 4357ba4c9bSIgal Liberman int memac_adjust_link(struct fman_mac *memac, u16 speed); 4457ba4c9bSIgal Liberman int memac_cfg_max_frame_len(struct fman_mac *memac, u16 new_val); 4557ba4c9bSIgal Liberman int memac_cfg_reset_on_init(struct fman_mac *memac, bool enable); 4657ba4c9bSIgal Liberman int memac_cfg_fixed_link(struct fman_mac *memac, 4757ba4c9bSIgal Liberman struct fixed_phy_status *fixed_link); 4857ba4c9bSIgal Liberman int memac_enable(struct fman_mac *memac, enum comm_mode mode); 4957ba4c9bSIgal Liberman int memac_disable(struct fman_mac *memac, enum comm_mode mode); 5057ba4c9bSIgal Liberman int memac_init(struct fman_mac *memac); 5157ba4c9bSIgal Liberman int memac_free(struct fman_mac *memac); 5257ba4c9bSIgal Liberman int memac_accept_rx_pause_frames(struct fman_mac *memac, bool en); 5357ba4c9bSIgal Liberman int memac_set_tx_pause_frames(struct fman_mac *memac, u8 priority, 5457ba4c9bSIgal Liberman u16 pause_time, u16 thresh_time); 5557ba4c9bSIgal Liberman int memac_set_exception(struct fman_mac *memac, 5657ba4c9bSIgal Liberman enum fman_mac_exceptions exception, bool enable); 5757ba4c9bSIgal Liberman int memac_add_hash_mac_address(struct fman_mac *memac, enet_addr_t *eth_addr); 5857ba4c9bSIgal Liberman int memac_del_hash_mac_address(struct fman_mac *memac, enet_addr_t *eth_addr); 5957ba4c9bSIgal Liberman 6057ba4c9bSIgal Liberman #endif /* __MEMAC_H */ 61