1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun ################################################################################ 4*4882a593Smuzhiyun # 5*4882a593Smuzhiyun # r8168 is the Linux device driver released for Realtek Gigabit Ethernet 6*4882a593Smuzhiyun # controllers with PCI-Express interface. 7*4882a593Smuzhiyun # 8*4882a593Smuzhiyun # Copyright(c) 2021 Realtek Semiconductor Corp. All rights reserved. 9*4882a593Smuzhiyun # 10*4882a593Smuzhiyun # This program is free software; you can redistribute it and/or modify it 11*4882a593Smuzhiyun # under the terms of the GNU General Public License as published by the Free 12*4882a593Smuzhiyun # Software Foundation; either version 2 of the License, or (at your option) 13*4882a593Smuzhiyun # any later version. 14*4882a593Smuzhiyun # 15*4882a593Smuzhiyun # This program is distributed in the hope that it will be useful, but WITHOUT 16*4882a593Smuzhiyun # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17*4882a593Smuzhiyun # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 18*4882a593Smuzhiyun # more details. 19*4882a593Smuzhiyun # 20*4882a593Smuzhiyun # You should have received a copy of the GNU General Public License along with 21*4882a593Smuzhiyun # this program; if not, see <http://www.gnu.org/licenses/>. 22*4882a593Smuzhiyun # 23*4882a593Smuzhiyun # Author: 24*4882a593Smuzhiyun # Realtek NIC software team <nicfae@realtek.com> 25*4882a593Smuzhiyun # No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan 26*4882a593Smuzhiyun # 27*4882a593Smuzhiyun ################################################################################ 28*4882a593Smuzhiyun */ 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun /************************************************************************************ 31*4882a593Smuzhiyun * This product is covered by one or more of the following patents: 32*4882a593Smuzhiyun * US6,570,884, US6,115,776, and US6,327,625. 33*4882a593Smuzhiyun ***********************************************************************************/ 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun //EEPROM opcodes 36*4882a593Smuzhiyun #define RTL_EEPROM_READ_OPCODE 06 37*4882a593Smuzhiyun #define RTL_EEPROM_WRITE_OPCODE 05 38*4882a593Smuzhiyun #define RTL_EEPROM_ERASE_OPCODE 07 39*4882a593Smuzhiyun #define RTL_EEPROM_EWEN_OPCODE 19 40*4882a593Smuzhiyun #define RTL_EEPROM_EWDS_OPCODE 16 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun #define RTL_CLOCK_RATE 3 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun void rtl8168_eeprom_type(struct rtl8168_private *tp); 45*4882a593Smuzhiyun void rtl8168_eeprom_cleanup(struct rtl8168_private *tp); 46*4882a593Smuzhiyun u16 rtl8168_eeprom_read_sc(struct rtl8168_private *tp, u16 reg); 47*4882a593Smuzhiyun void rtl8168_eeprom_write_sc(struct rtl8168_private *tp, u16 reg, u16 data); 48*4882a593Smuzhiyun void rtl8168_shift_out_bits(struct rtl8168_private *tp, int data, int count); 49*4882a593Smuzhiyun u16 rtl8168_shift_in_bits(struct rtl8168_private *tp); 50*4882a593Smuzhiyun void rtl8168_raise_clock(struct rtl8168_private *tp, u8 *x); 51*4882a593Smuzhiyun void rtl8168_lower_clock(struct rtl8168_private *tp, u8 *x); 52*4882a593Smuzhiyun void rtl8168_stand_by(struct rtl8168_private *tp); 53*4882a593Smuzhiyun void rtl8168_set_eeprom_sel_low(struct rtl8168_private *tp); 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun 57