2 * Ethernet: An implementation of the Ethernet Device Driver suite for the
3 * uClinux 2.0.38 operating system. This Driver has been developed
6 * NOTE: The driver is implemented for one MAC
8 * Version: @(#)at91rm9200_net.h 1.0.0 01/10/2001
10 * Authors: Lineo Inc <www.lineo.com>
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version
16 * 2 of the License, or (at your option) any later version.
19 #ifndef AT91RM9200_ETHERNET
20 #define AT91RM9200_ETHERNET
24 #include <asm/arch/hardware.h>
26 #define ETHERNET_ADDRESS_SIZE 6
28 typedef unsigned char UCHAR;
30 /* Interface to drive the physical layer */
31 typedef struct _AT91S_PhyOps
33 unsigned char (*Init)(AT91S_EMAC *pmac);
34 unsigned int (*IsPhyConnected)(AT91S_EMAC *pmac);
35 unsigned char (*GetLinkSpeed)(AT91S_EMAC *pmac);
36 unsigned char (*AutoNegotiate)(AT91S_EMAC *pmac, int *);
38 } AT91S_PhyOps,*AT91PS_PhyOps;
41 #define EMAC_DESC_DONE 0x00000001 /* ownership bit */
42 #define EMAC_DESC_WRAP 0x00000002 /* bit for wrap */
44 /****************** function prototypes **********************/
47 void at91rm9200_EmacEnableMDIO(AT91PS_EMAC p_mac);
48 void at91rm9200_EmacDisableMDIO(AT91PS_EMAC p_mac);
49 UCHAR at91rm9200_EmacReadPhy(AT91PS_EMAC p_mac, unsigned char RegisterAddress, unsigned short *pInput);
50 UCHAR at91rm9200_EmacWritePhy(AT91PS_EMAC p_mac, unsigned char RegisterAddress, unsigned short *pOutput);
51 void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops);
53 #endif /* AT91RM9200_ETHERNET */