1 /* 2 * Copyright (C) 2008 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of 7 * the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 17 * MA 02111-1307 USA 18 */ 19 20 #define PCIREG_8(_adr) (*(volatile unsigned char *)(_adr)) 21 #define PCIREG_32(_adr) (*(volatile unsigned long *)(_adr)) 22 #define PCI_PAR PCIREG_32(0xfe0401c0) 23 #define PCI_PDR PCIREG_32(0xfe040220) 24 #define PCI_CR PCIREG_32(0xfe040100) 25 #define PCI_CONF1 PCIREG_32(0xfe040004) 26 27 #define HIGH 1 28 #define LOW 0 29 30 #define PCI_PROG 0x80 31 #define PCI_EEP_ADDRESS (unsigned short)0x0007 32 #define PCI_MAC_ADDRESS_SIZE 3 33 34 #define TIME1 100 35 #define TIME2 20000 36 37 #define BIT_DUMMY 0 38 #define MAC_EEP_READ 1 39 #define MAC_EEP_WRITE 2 40 #define MAC_EEP_ERACE 3 41 #define MAC_EEP_EWEN 4 42 #define MAC_EEP_EWDS 5 43 44 /* RTL8169 */ 45 const unsigned short EEPROM_W_Data_8169_A[] = { 46 0x8129, 0x10ec, 0x8169, 0x1154, 0x032b, 47 0x4020, 0xa101 48 }; 49 const unsigned short EEPROM_W_Data_8169_B[] = { 50 0x4d15, 0xf7c2, 0x8000, 0x0000, 0x0000, 0x1300, 51 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 52 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2000, 53 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 54 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 55 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 56 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 57 }; 58