rtl8169.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. #define PCIREG_8(_adr) (*(volatile unsigned char *)(_adr))
  20. #define PCIREG_32(_adr) (*(volatile unsigned long *)(_adr))
  21. #define PCI_PAR PCIREG_32(0xfe0401c0)
  22. #define PCI_PDR PCIREG_32(0xfe040220)
  23. #define PCI_CR PCIREG_32(0xfe040100)
  24. #define PCI_CONF1 PCIREG_32(0xfe040004)
  25. #define HIGH 1
  26. #define LOW 0
  27. #define PCI_PROG 0x80
  28. #define PCI_EEP_ADDRESS (unsigned short)0x0007
  29. #define PCI_MAC_ADDRESS_SIZE 3
  30. #define TIME1 100
  31. #define TIME2 20000
  32. #define BIT_DUMMY 0
  33. #define MAC_EEP_READ 1
  34. #define MAC_EEP_WRITE 2
  35. #define MAC_EEP_ERACE 3
  36. #define MAC_EEP_EWEN 4
  37. #define MAC_EEP_EWDS 5
  38. /* RTL8169 */
  39. const unsigned short EEPROM_W_Data_8169_A[] = {
  40. 0x8129, 0x10ec, 0x8169, 0x1154, 0x032b,
  41. 0x4020, 0xa101
  42. };
  43. const unsigned short EEPROM_W_Data_8169_B[] = {
  44. 0x4d15, 0xf7c2, 0x8000, 0x0000, 0x0000, 0x1300,
  45. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  46. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2000,
  47. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  48. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  49. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  50. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
  51. };