xref: /dragonfly/sys/dev/netif/ix/ixgbe_x540.h (revision 6150453f)
179251f5eSSepherosa Ziehau /******************************************************************************
279251f5eSSepherosa Ziehau 
3*6150453fSSepherosa Ziehau   Copyright (c) 2001-2017, Intel Corporation
479251f5eSSepherosa Ziehau   All rights reserved.
579251f5eSSepherosa Ziehau 
679251f5eSSepherosa Ziehau   Redistribution and use in source and binary forms, with or without
779251f5eSSepherosa Ziehau   modification, are permitted provided that the following conditions are met:
879251f5eSSepherosa Ziehau 
979251f5eSSepherosa Ziehau    1. Redistributions of source code must retain the above copyright notice,
1079251f5eSSepherosa Ziehau       this list of conditions and the following disclaimer.
1179251f5eSSepherosa Ziehau 
1279251f5eSSepherosa Ziehau    2. Redistributions in binary form must reproduce the above copyright
1379251f5eSSepherosa Ziehau       notice, this list of conditions and the following disclaimer in the
1479251f5eSSepherosa Ziehau       documentation and/or other materials provided with the distribution.
1579251f5eSSepherosa Ziehau 
1679251f5eSSepherosa Ziehau    3. Neither the name of the Intel Corporation nor the names of its
1779251f5eSSepherosa Ziehau       contributors may be used to endorse or promote products derived from
1879251f5eSSepherosa Ziehau       this software without specific prior written permission.
1979251f5eSSepherosa Ziehau 
2079251f5eSSepherosa Ziehau   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2179251f5eSSepherosa Ziehau   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2279251f5eSSepherosa Ziehau   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2379251f5eSSepherosa Ziehau   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
2479251f5eSSepherosa Ziehau   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2579251f5eSSepherosa Ziehau   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2679251f5eSSepherosa Ziehau   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2779251f5eSSepherosa Ziehau   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2879251f5eSSepherosa Ziehau   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2979251f5eSSepherosa Ziehau   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3079251f5eSSepherosa Ziehau   POSSIBILITY OF SUCH DAMAGE.
3179251f5eSSepherosa Ziehau 
3279251f5eSSepherosa Ziehau ******************************************************************************/
3379251f5eSSepherosa Ziehau /*$FreeBSD$*/
3479251f5eSSepherosa Ziehau 
3579251f5eSSepherosa Ziehau #ifndef _IXGBE_X540_H_
3679251f5eSSepherosa Ziehau #define _IXGBE_X540_H_
3779251f5eSSepherosa Ziehau 
3879251f5eSSepherosa Ziehau #include "ixgbe_type.h"
3979251f5eSSepherosa Ziehau 
4079251f5eSSepherosa Ziehau s32 ixgbe_get_link_capabilities_X540(struct ixgbe_hw *hw,
4179251f5eSSepherosa Ziehau 				     ixgbe_link_speed *speed, bool *autoneg);
4279251f5eSSepherosa Ziehau enum ixgbe_media_type ixgbe_get_media_type_X540(struct ixgbe_hw *hw);
4379251f5eSSepherosa Ziehau s32 ixgbe_setup_mac_link_X540(struct ixgbe_hw *hw, ixgbe_link_speed speed,
4479251f5eSSepherosa Ziehau 			      bool link_up_wait_to_complete);
4579251f5eSSepherosa Ziehau s32 ixgbe_reset_hw_X540(struct ixgbe_hw *hw);
4679251f5eSSepherosa Ziehau s32 ixgbe_start_hw_X540(struct ixgbe_hw *hw);
47*6150453fSSepherosa Ziehau u64 ixgbe_get_supported_physical_layer_X540(struct ixgbe_hw *hw);
4879251f5eSSepherosa Ziehau 
4979251f5eSSepherosa Ziehau s32 ixgbe_init_eeprom_params_X540(struct ixgbe_hw *hw);
5079251f5eSSepherosa Ziehau s32 ixgbe_read_eerd_X540(struct ixgbe_hw *hw, u16 offset, u16 *data);
5179251f5eSSepherosa Ziehau s32 ixgbe_read_eerd_buffer_X540(struct ixgbe_hw *hw, u16 offset, u16 words,
5279251f5eSSepherosa Ziehau 				u16 *data);
5379251f5eSSepherosa Ziehau s32 ixgbe_write_eewr_X540(struct ixgbe_hw *hw, u16 offset, u16 data);
5479251f5eSSepherosa Ziehau s32 ixgbe_write_eewr_buffer_X540(struct ixgbe_hw *hw, u16 offset, u16 words,
5579251f5eSSepherosa Ziehau 				 u16 *data);
5679251f5eSSepherosa Ziehau s32 ixgbe_update_eeprom_checksum_X540(struct ixgbe_hw *hw);
5779251f5eSSepherosa Ziehau s32 ixgbe_validate_eeprom_checksum_X540(struct ixgbe_hw *hw, u16 *checksum_val);
5863d483cdSSepherosa Ziehau s32 ixgbe_calc_eeprom_checksum_X540(struct ixgbe_hw *hw);
5979251f5eSSepherosa Ziehau s32 ixgbe_update_flash_X540(struct ixgbe_hw *hw);
6079251f5eSSepherosa Ziehau 
6163d483cdSSepherosa Ziehau s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask);
6263d483cdSSepherosa Ziehau void ixgbe_release_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask);
63*6150453fSSepherosa Ziehau void ixgbe_init_swfw_sync_X540(struct ixgbe_hw *hw);
6479251f5eSSepherosa Ziehau 
6579251f5eSSepherosa Ziehau s32 ixgbe_blink_led_start_X540(struct ixgbe_hw *hw, u32 index);
6679251f5eSSepherosa Ziehau s32 ixgbe_blink_led_stop_X540(struct ixgbe_hw *hw, u32 index);
6779251f5eSSepherosa Ziehau #endif /* _IXGBE_X540_H_ */
6879251f5eSSepherosa Ziehau 
69