at91rm9200_net.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Ethernet: An implementation of the Ethernet Device Driver suite for the
  3. * uClinux 2.0.38 operating system. This Driver has been developed
  4. * for AT75C220 board.
  5. *
  6. * NOTE: The driver is implemented for one MAC
  7. *
  8. * Version: @(#)at91rm9200_net.h 1.0.0 01/10/2001
  9. *
  10. * Authors: Lineo Inc <www.lineo.com>
  11. *
  12. *
  13. * SPDX-License-Identifier: GPL-2.0+
  14. */
  15. #ifndef AT91RM9200_ETHERNET
  16. #define AT91RM9200_ETHERNET
  17. #include <common.h>
  18. #include <asm/io.h>
  19. #include <asm/arch/hardware.h>
  20. #define ETHERNET_ADDRESS_SIZE 6
  21. typedef unsigned char UCHAR;
  22. /* Interface to drive the physical layer */
  23. typedef struct _AT91S_PhyOps
  24. {
  25. unsigned char (*Init)(AT91S_EMAC *pmac);
  26. unsigned int (*IsPhyConnected)(AT91S_EMAC *pmac);
  27. unsigned char (*GetLinkSpeed)(AT91S_EMAC *pmac);
  28. unsigned char (*AutoNegotiate)(AT91S_EMAC *pmac, int *);
  29. } AT91S_PhyOps,*AT91PS_PhyOps;
  30. #define EMAC_DESC_DONE 0x00000001 /* ownership bit */
  31. #define EMAC_DESC_WRAP 0x00000002 /* bit for wrap */
  32. /****************** function prototypes **********************/
  33. /* MII functions */
  34. void at91rm9200_EmacEnableMDIO(AT91PS_EMAC p_mac);
  35. void at91rm9200_EmacDisableMDIO(AT91PS_EMAC p_mac);
  36. UCHAR at91rm9200_EmacReadPhy(AT91PS_EMAC p_mac, unsigned char RegisterAddress, unsigned short *pInput);
  37. UCHAR at91rm9200_EmacWritePhy(AT91PS_EMAC p_mac, unsigned char RegisterAddress, unsigned short *pOutput);
  38. void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops);
  39. #endif /* AT91RM9200_ETHERNET */