netarm_eth.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (C) 2003 IMMS gGmbH <www.imms.de>
  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. * author(s): Thomas Elste, <info@elste.org>
  20. */
  21. #include <asm/types.h>
  22. #include <config.h>
  23. #ifdef CONFIG_DRIVER_NETARMETH
  24. #define SET_EADDR(ad,val) *(volatile unsigned int*)(ad + NETARM_ETH_MODULE_BASE) = val
  25. #define GET_EADDR(ad) (*(volatile unsigned int*)(ad + NETARM_ETH_MODULE_BASE))
  26. #define NA_MII_POLL_BUSY_DELAY 900
  27. /* MII negotiation timeout value
  28. 500 jiffies = 5 seconds */
  29. #define NA_MII_NEGOTIATE_DELAY 30
  30. /* Registers in the physical layer chip */
  31. #define MII_PHY_CONTROL 0
  32. #define MII_PHY_STATUS 1
  33. #define MII_PHY_ID 2
  34. #define MII_PHY_AUTONEGADV 4
  35. #endif /* CONFIG_DRIVER_NETARMETH */