IxEthAccMii_p.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**
  2. * @file IxEthAccMii_p.h
  3. *
  4. * @author Intel Corporation
  5. * @date
  6. *
  7. * @brief MII Header file
  8. *
  9. * Design Notes:
  10. *
  11. *
  12. * @par
  13. * IXP400 SW Release version 2.0
  14. *
  15. * -- Copyright Notice --
  16. *
  17. * @par
  18. * Copyright 2001-2005, Intel Corporation.
  19. * All rights reserved.
  20. *
  21. * @par
  22. * SPDX-License-Identifier: BSD-3-Clause
  23. * @par
  24. * -- End of Copyright Notice --
  25. */
  26. #ifndef IxEthAccMii_p_H
  27. #define IxEthAccMii_p_H
  28. /* MII definitions - these have been verified against the LXT971 and LXT972 PHYs*/
  29. #define IXP425_ETH_ACC_MII_MAX_REG 32 /* max register per phy */
  30. #define IX_ETH_ACC_MII_REG_SHL 16
  31. #define IX_ETH_ACC_MII_ADDR_SHL 21
  32. /* Definitions for MII access routines*/
  33. #define IX_ETH_ACC_MII_GO BIT(31)
  34. #define IX_ETH_ACC_MII_WRITE BIT(26)
  35. #define IX_ETH_ACC_MII_TIMEOUT_10TH_SECS 5
  36. #define IX_ETH_ACC_MII_10TH_SEC_IN_MILLIS 100
  37. #define IX_ETH_ACC_MII_READ_FAIL BIT(31)
  38. #define IX_ETH_ACC_MII_PHY_DEF_DELAY 300 /* max delay before link up, etc. */
  39. #define IX_ETH_ACC_MII_PHY_NO_DELAY 0x0 /* do not delay */
  40. #define IX_ETH_ACC_MII_PHY_NULL 0xff /* PHY is not present */
  41. #define IX_ETH_ACC_MII_PHY_DEF_ADDR 0x0 /* default PHY's logical address */
  42. #ifndef IX_ETH_ACC_MII_MONITOR_DELAY
  43. # define IX_ETH_ACC_MII_MONITOR_DELAY 0x5 /* in seconds */
  44. #endif
  45. /* Register definition */
  46. #define IX_ETH_ACC_MII_CTRL_REG 0x0 /* Control Register */
  47. #define IX_ETH_ACC_MII_STAT_REG 0x1 /* Status Register */
  48. #define IX_ETH_ACC_MII_PHY_ID1_REG 0x2 /* PHY identifier 1 Register */
  49. #define IX_ETH_ACC_MII_PHY_ID2_REG 0x3 /* PHY identifier 2 Register */
  50. #define IX_ETH_ACC_MII_AN_ADS_REG 0x4 /* Auto-Negotiation */
  51. /* Advertisement Register */
  52. #define IX_ETH_ACC_MII_AN_PRTN_REG 0x5 /* Auto-Negotiation */
  53. /* partner ability Register */
  54. #define IX_ETH_ACC_MII_AN_EXP_REG 0x6 /* Auto-Negotiation */
  55. /* Expansion Register */
  56. #define IX_ETH_ACC_MII_AN_NEXT_REG 0x7 /* Auto-Negotiation */
  57. /* next-page transmit Register */
  58. IxEthAccStatus ixEthAccMdioShow (void);
  59. IxEthAccStatus ixEthAccMiiInit(void);
  60. void ixEthAccMiiUnload(void);
  61. #endif /*IxEthAccMii_p_H*/