gmii.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /****************************************************************************
  2. * Driver for Solarflare Solarstorm network controllers and boards
  3. * Copyright 2005-2006 Fen Systems Ltd.
  4. * Copyright 2006-2008 Solarflare Communications Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published
  8. * by the Free Software Foundation, incorporated herein by reference.
  9. */
  10. #ifndef EFX_GMII_H
  11. #define EFX_GMII_H
  12. /*
  13. * GMII interface
  14. */
  15. #include <linux/mii.h>
  16. /* GMII registers, excluding registers already defined as MII
  17. * registers in mii.h
  18. */
  19. #define GMII_IER 0x12 /* Interrupt enable register */
  20. #define GMII_ISR 0x13 /* Interrupt status register */
  21. /* Interrupt enable register */
  22. #define IER_ANEG_ERR 0x8000 /* Bit 15 - autonegotiation error */
  23. #define IER_SPEED_CHG 0x4000 /* Bit 14 - speed changed */
  24. #define IER_DUPLEX_CHG 0x2000 /* Bit 13 - duplex changed */
  25. #define IER_PAGE_RCVD 0x1000 /* Bit 12 - page received */
  26. #define IER_ANEG_DONE 0x0800 /* Bit 11 - autonegotiation complete */
  27. #define IER_LINK_CHG 0x0400 /* Bit 10 - link status changed */
  28. #define IER_SYM_ERR 0x0200 /* Bit 9 - symbol error */
  29. #define IER_FALSE_CARRIER 0x0100 /* Bit 8 - false carrier */
  30. #define IER_FIFO_ERR 0x0080 /* Bit 7 - FIFO over/underflow */
  31. #define IER_MDIX_CHG 0x0040 /* Bit 6 - MDI crossover changed */
  32. #define IER_DOWNSHIFT 0x0020 /* Bit 5 - downshift */
  33. #define IER_ENERGY 0x0010 /* Bit 4 - energy detect */
  34. #define IER_DTE_POWER 0x0004 /* Bit 2 - DTE power detect */
  35. #define IER_POLARITY_CHG 0x0002 /* Bit 1 - polarity changed */
  36. #define IER_JABBER 0x0001 /* Bit 0 - jabber */
  37. /* Interrupt status register */
  38. #define ISR_ANEG_ERR 0x8000 /* Bit 15 - autonegotiation error */
  39. #define ISR_SPEED_CHG 0x4000 /* Bit 14 - speed changed */
  40. #define ISR_DUPLEX_CHG 0x2000 /* Bit 13 - duplex changed */
  41. #define ISR_PAGE_RCVD 0x1000 /* Bit 12 - page received */
  42. #define ISR_ANEG_DONE 0x0800 /* Bit 11 - autonegotiation complete */
  43. #define ISR_LINK_CHG 0x0400 /* Bit 10 - link status changed */
  44. #define ISR_SYM_ERR 0x0200 /* Bit 9 - symbol error */
  45. #define ISR_FALSE_CARRIER 0x0100 /* Bit 8 - false carrier */
  46. #define ISR_FIFO_ERR 0x0080 /* Bit 7 - FIFO over/underflow */
  47. #define ISR_MDIX_CHG 0x0040 /* Bit 6 - MDI crossover changed */
  48. #define ISR_DOWNSHIFT 0x0020 /* Bit 5 - downshift */
  49. #define ISR_ENERGY 0x0010 /* Bit 4 - energy detect */
  50. #define ISR_DTE_POWER 0x0004 /* Bit 2 - DTE power detect */
  51. #define ISR_POLARITY_CHG 0x0002 /* Bit 1 - polarity changed */
  52. #define ISR_JABBER 0x0001 /* Bit 0 - jabber */
  53. #endif /* EFX_GMII_H */