diff options
author | wdenk <wdenk> | 2003-06-16 23:50:08 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-06-16 23:50:08 +0000 |
commit | 2abbe0754759f94c79125a2534fbc4be74f416bc (patch) | |
tree | 98c52ea3bade5efef565044ede183d6c2b30629b /include/at91rm9200_net.h | |
parent | 71f9511803de65a3b98d2f592d418da1d1539f13 (diff) |
* Patch by Nicolas Lacressonniere, 11 Jun 2003:
Modifications for Atmel AT91RM9200DK ARM920T based development kit
- Add Atmel DataFlash support for reading and writing.
- Add possibility to boot a Linux from DataFlash with BOOTM command.
- Add Flash detection on Atmel AT91RM9200DK
(between Atmel AT49BV1614 and AT49BV1614A flashes)
- Replace old Ethernet PHY layer functions
- Change link address
* Patch by Frank Smith, 9 Jun 2003:
use CRIT_EXCEPTION for machine check on 4xx
* Patch by Detlev Zundel, 13 Jun 2003:
added implementation of the "carinfo" command in cmd_immap.c
Diffstat (limited to 'include/at91rm9200_net.h')
-rw-r--r-- | include/at91rm9200_net.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/include/at91rm9200_net.h b/include/at91rm9200_net.h new file mode 100644 index 00000000000..e41fe3cf7ca --- /dev/null +++ b/include/at91rm9200_net.h @@ -0,0 +1,59 @@ +/* + * Ethernet: An implementation of the Ethernet Device Driver suite for the + * uClinux 2.0.38 operating system. This Driver has been developed + * for AT75C220 board. + * + * NOTE: The driver is implemented for one MAC + * + * Version: @(#)at91rm9200_net.h 1.0.0 01/10/2001 + * + * Authors: Lineo Inc <www.lineo.com> + * + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef AT91RM9200_ETHERNET +#define AT91RM9200_ETHERNET + +#include <common.h> +#include <asm/io.h> +#include <asm/arch/hardware.h> +#include "dm9161.h" + +#define FALSE 0 +#define TRUE 1 + + +#define ETHERNET_ADDRESS_SIZE 6 + +typedef unsigned char UCHAR; + +/* Interface to drive the physical layer */ +typedef struct _AT91S_PhyOps +{ + unsigned char (*Init)(AT91S_EMAC *pmac); + unsigned int (*IsPhyConnected)(AT91S_EMAC *pmac); + unsigned char (*GetLinkSpeed)(AT91S_EMAC *pmac); + unsigned char (*AutoNegotiate)(AT91S_EMAC *pmac, int *); + +} AT91S_PhyOps,*AT91PS_PhyOps; + + +#define EMAC_DESC_DONE 0x00000001 /* ownership bit */ +#define EMAC_DESC_WRAP 0x00000002 /* bit for wrap */ + +/****************** function prototypes **********************/ + +/* MII functions */ +static void at91rm9200_EmacEnableMDIO(AT91PS_EMAC p_mac); +static void at91rm9200_EmacDisableMDIO(AT91PS_EMAC p_mac); +static UCHAR at91rm9200_EmacReadPhy(AT91PS_EMAC p_mac, unsigned char RegisterAddress, unsigned short *pInput); +static UCHAR at91rm9200_EmacWritePhy(AT91PS_EMAC p_mac, unsigned char RegisterAddress, unsigned short *pOutput); +void at91rm92000_GetPhyInterface(void ); + +#endif /* AT91RM9200_ETHERNET */ + |