xref: /freebsd/sys/dev/ixgbe/ixgbe_x540.h (revision 71625ec9)
185d0a26eSJack F Vogel /******************************************************************************
27282444bSPedro F. Giffuni   SPDX-License-Identifier: BSD-3-Clause
385d0a26eSJack F Vogel 
48455e365SKevin Bowling   Copyright (c) 2001-2020, Intel Corporation
585d0a26eSJack F Vogel   All rights reserved.
685d0a26eSJack F Vogel 
785d0a26eSJack F Vogel   Redistribution and use in source and binary forms, with or without
885d0a26eSJack F Vogel   modification, are permitted provided that the following conditions are met:
985d0a26eSJack F Vogel 
1085d0a26eSJack F Vogel    1. Redistributions of source code must retain the above copyright notice,
1185d0a26eSJack F Vogel       this list of conditions and the following disclaimer.
1285d0a26eSJack F Vogel 
1385d0a26eSJack F Vogel    2. Redistributions in binary form must reproduce the above copyright
1485d0a26eSJack F Vogel       notice, this list of conditions and the following disclaimer in the
1585d0a26eSJack F Vogel       documentation and/or other materials provided with the distribution.
1685d0a26eSJack F Vogel 
1785d0a26eSJack F Vogel    3. Neither the name of the Intel Corporation nor the names of its
1885d0a26eSJack F Vogel       contributors may be used to endorse or promote products derived from
1985d0a26eSJack F Vogel       this software without specific prior written permission.
2085d0a26eSJack F Vogel 
2185d0a26eSJack F Vogel   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2285d0a26eSJack F Vogel   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2385d0a26eSJack F Vogel   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2485d0a26eSJack F Vogel   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
2585d0a26eSJack F Vogel   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2685d0a26eSJack F Vogel   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2785d0a26eSJack F Vogel   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2885d0a26eSJack F Vogel   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2985d0a26eSJack F Vogel   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3085d0a26eSJack F Vogel   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3185d0a26eSJack F Vogel   POSSIBILITY OF SUCH DAMAGE.
3285d0a26eSJack F Vogel 
3385d0a26eSJack F Vogel ******************************************************************************/
3485d0a26eSJack F Vogel 
3585d0a26eSJack F Vogel #ifndef _IXGBE_X540_H_
3685d0a26eSJack F Vogel #define _IXGBE_X540_H_
3785d0a26eSJack F Vogel 
3885d0a26eSJack F Vogel #include "ixgbe_type.h"
3985d0a26eSJack F Vogel 
4085d0a26eSJack F Vogel s32 ixgbe_get_link_capabilities_X540(struct ixgbe_hw *hw,
4185d0a26eSJack F Vogel 				     ixgbe_link_speed *speed, bool *autoneg);
4285d0a26eSJack F Vogel enum ixgbe_media_type ixgbe_get_media_type_X540(struct ixgbe_hw *hw);
4385d0a26eSJack F Vogel s32 ixgbe_setup_mac_link_X540(struct ixgbe_hw *hw, ixgbe_link_speed speed,
440ecc2ff0SJack F Vogel 			      bool link_up_wait_to_complete);
4585d0a26eSJack F Vogel s32 ixgbe_reset_hw_X540(struct ixgbe_hw *hw);
4685d0a26eSJack F Vogel s32 ixgbe_start_hw_X540(struct ixgbe_hw *hw);
478eb6488eSEric Joyner u64 ixgbe_get_supported_physical_layer_X540(struct ixgbe_hw *hw);
4885d0a26eSJack F Vogel 
4985d0a26eSJack F Vogel s32 ixgbe_init_eeprom_params_X540(struct ixgbe_hw *hw);
5085d0a26eSJack F Vogel s32 ixgbe_read_eerd_X540(struct ixgbe_hw *hw, u16 offset, u16 *data);
5185d0a26eSJack F Vogel s32 ixgbe_read_eerd_buffer_X540(struct ixgbe_hw *hw, u16 offset, u16 words,
5285d0a26eSJack F Vogel 				u16 *data);
5385d0a26eSJack F Vogel s32 ixgbe_write_eewr_X540(struct ixgbe_hw *hw, u16 offset, u16 data);
5485d0a26eSJack F Vogel s32 ixgbe_write_eewr_buffer_X540(struct ixgbe_hw *hw, u16 offset, u16 words,
5585d0a26eSJack F Vogel 				 u16 *data);
5685d0a26eSJack F Vogel s32 ixgbe_update_eeprom_checksum_X540(struct ixgbe_hw *hw);
5785d0a26eSJack F Vogel s32 ixgbe_validate_eeprom_checksum_X540(struct ixgbe_hw *hw, u16 *checksum_val);
58758cc3dcSJack F Vogel s32 ixgbe_calc_eeprom_checksum_X540(struct ixgbe_hw *hw);
59fd75b91dSJack F Vogel s32 ixgbe_update_flash_X540(struct ixgbe_hw *hw);
6085d0a26eSJack F Vogel 
61758cc3dcSJack F Vogel s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask);
62758cc3dcSJack F Vogel void ixgbe_release_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask);
638eb6488eSEric Joyner void ixgbe_init_swfw_sync_X540(struct ixgbe_hw *hw);
6485d0a26eSJack F Vogel 
6585d0a26eSJack F Vogel s32 ixgbe_blink_led_start_X540(struct ixgbe_hw *hw, u32 index);
6685d0a26eSJack F Vogel s32 ixgbe_blink_led_stop_X540(struct ixgbe_hw *hw, u32 index);
6785d0a26eSJack F Vogel #endif /* _IXGBE_X540_H_ */
68fd75b91dSJack F Vogel 
69