new at91_emac network driver (NET_MULTI api)
Subsystems (2)
PATCH v3 8/9 new at91_emac network driver (NET_MULTI api)
* add's at91_emac (AT91RM9200) network driver (NET_MULTI api)
* enable driver with CONFIG_DRIVER_AT91EMAC
* generic PHY initialization
* modify AT91RM9200 boards to use NET_MULTI driver
* the drivers has been tested with LXT971 Phy and DM9161 Phy at MII and RMII interface
--- README | 10 + board/atmel/at91rm9200dk/at91rm9200dk.c | 15 + board/atmel/at91rm9200ek/at91rm9200ek.c | 14 + board/cmc_pu2/cmc_pu2.c | 13 + board/csb637/csb637.c | 13 + board/eukrea/cpuat91/cpuat91.c | 14 + board/kb9202/kb9202.c | 13 + board/m501sk/m501sk.c | 14 + board/mp2usb/mp2usb.c | 13 + cpu/arm920t/at91rm9200/bcm5221.c | 4 +- cpu/arm920t/at91rm9200/dm9161.c | 3 +- drivers/net/Makefile | 1 + drivers/net/at91_emac.c | 498 +++++++++++++++++++++++++++++++ include/asm-arm/arch-at91/at91_emac.h | 145 +++++++++ include/configs/at91rm9200dk.h | 9 +- include/configs/at91rm9200ek.h | 8 +- include/configs/cmc_pu2.h | 8 +- include/configs/cpuat91.h | 8 +- include/configs/csb637.h | 8 +- include/configs/kb9202.h | 8 +- include/configs/m501sk.h | 9 +- include/configs/mp2usb.h | 8 +- include/netdev.h | 1 + 23 files changed, 825 insertions(+), 12 deletions(-) create mode 100644 drivers/net/at91_emac.c create mode 100644 include/asm-arm/arch-at91/at91_emac.h
README +10 -0
@@ -822,6 +822,16 @@ The following options need to be configured: - NETWORK Support (other): + CONFIG_DRIVER_AT91EMAC + Support for AT91RM9200 EMAC. + + CONFIG_RMII + Define this to use reduced MII inteface + + CONFIG_DRIVER_AT91EMAC_QUIET + If this defined, the driver is quiet. + The driver doen't show link status messages. + CONFIG_DRIVER_LAN91C96 Support for SMSC's LAN91C96 chips.
board/atmel/at91rm9200dk/at91rm9200dk.c +15 -0
@@ -23,9 +23,15 @@*/ #include <common.h> +#include <exports.h> +#include <netdev.h> #include <asm/arch/AT91RM9200.h> +#include <asm/io.h> + +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <dm9161.h> +#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -95,6 +101,15 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)#endif #endif /* CONFIG_DRIVER_ETHER */ +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif +/* * Disk On Chip (NAND) Millenium initialization. * The NAND lives in the CS2* space
board/atmel/at91rm9200ek/at91rm9200ek.c +14 -0
@@ -23,9 +23,14 @@*/ #include <common.h> +#include <exports.h> +#include <netdev.h> #include <asm/arch/AT91RM9200.h> +#include <asm/io.h> +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <dm9161.h> +#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -84,3 +89,12 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops) p_phyops->AutoNegotiate = dm9161_AutoNegotiate; }#endif + +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif
board/cmc_pu2/cmc_pu2.c +13 -0
@@ -30,8 +30,12 @@#include <common.h> #include <asm/mach-types.h> #include <asm/arch/AT91RM9200.h> +#include <asm/io.h> +#include <netdev.h> +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <dm9161.h> +#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -177,3 +181,12 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)#endif #endif /* CONFIG_DRIVER_ETHER */ + +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif
board/csb637/csb637.c +13 -0
@@ -23,8 +23,12 @@#include <common.h> #include <asm/arch/AT91RM9200.h> +#include <netdev.h> +#include <asm/io.h> +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <bcm5221.h> +#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -79,3 +83,12 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)#endif #endif /* CONFIG_DRIVER_ETHER */ + +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif
board/eukrea/cpuat91/cpuat91.c +14 -0
@@ -26,9 +26,14 @@*/ #include <common.h> +#include <netdev.h> #include <asm/arch/AT91RM9200.h> +#include <asm/io.h> + +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <ks8721.h> +#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -79,3 +84,12 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)#endif /* CONFIG_CMD_NET */ #endif /* CONFIG_DRIVER_ETHER */ +#ifdef CONFIG_DRIVER_AT91EMAC + +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif
board/kb9202/kb9202.c +13 -0
@@ -28,8 +28,12 @@#include <common.h> #include <asm/arch/AT91RM9200.h> +#include <asm/io.h> +#include <netdev.h> +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <lxt971a.h> +#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -92,3 +96,12 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)#endif #endif /* CONFIG_DRIVER_ETHER */ + +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif
board/m501sk/m501sk.c +14 -0
@@ -24,8 +24,13 @@*/ #include <common.h> +#include <asm/io.h> +#include <netdev.h> +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <dm9161.h> +#endif +#include "m501sk.h" #include "net.h"
@@ -186,4 +191,13 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops) }#endif /* CONFIG_CMD_NET */ #endif /* CONFIG_DRIVER_ETHER */ + +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif #endif /* CONFIG_M501SK */
board/mp2usb/mp2usb.c +13 -0
@@ -27,8 +27,12 @@#include <common.h> #include <asm/arch/AT91RM9200.h> +#include <netdev.h> +#include <asm/io.h> +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <dm9161.h> +#endif #include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -83,3 +87,12 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)#endif #endif /* CONFIG_DRIVER_ETHER */ + +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif
cpu/arm920t/at91rm9200/bcm5221.c +2 -2
@@ -28,10 +28,10 @@#include <at91rm9200_net.h> #include <net.h> -#include <bcm5221.h> -#ifdef CONFIG_DRIVER_ETHER +#include <bcm5221.h> +#if defined(CONFIG_CMD_NET )/*
cpu/arm920t/at91rm9200/dm9161.c +1 -2
@@ -23,9 +23,8 @@#include <at91rm9200_net.h> #include <net.h> -#include <dm9161.h> -#ifdef CONFIG_DRIVER_ETHER +#include <dm9161.h> #if defined(CONFIG_CMD_NET )
drivers/net/Makefile +1 -0
@@ -27,6 +27,7 @@ LIB := $(obj)libnet.a COBJS-$(CONFIG_DRIVER_3C589) += 3c589.o COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o +COBJS-$(CONFIG_DRIVER_AT91EMAC) += at91_emac.o COBJS-$(CONFIG_DRIVER_AX88180) += ax88180.o COBJS-$(CONFIG_BCM570x) += bcm570x.o bcm570x_autoneg.o 5701rls.o COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o
drivers/net/at91_emac.c new file +498 -0
498 lines not on this page · raw message
include/asm-arm/arch-at91/at91_emac.h new file +145 -0
145 lines not on this page · raw message
include/configs/at91rm9200dk.h +8 -1
@@ -124,7 +124,14 @@#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM#define CONFIG_SYS_MEMTEST_END CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144 -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif +#define CONFIG_NET_RETRY_COUNT 20#define CONFIG_AT91C_USE_RMII
include/configs/at91rm9200ek.h +7 -1
@@ -147,7 +147,13 @@/* * Network Driver Setting */ -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#define CONFIG_AT91C_USE_RMII
include/configs/cmc_pu2.h +7 -1
@@ -154,7 +154,13 @@#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM#define CONFIG_SYS_MEMTEST_END CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144 -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#define CONFIG_AT91C_USE_RMII
include/configs/cpuat91.h +7 -1
@@ -130,7 +130,13 @@#define CONFIG_SYS_MEMTEST_END \ (CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 512 * 1024) -#define CONFIG_DRIVER_ETHER 1 +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#define CONFIG_AT91C_USE_RMII 1#define CONFIG_PHY_ADDRESS (1 << 5)
include/configs/csb637.h +7 -1
@@ -128,7 +128,13 @@#define CONFIG_SYS_ALT_MEMTEST 1#define CONFIG_SYS_MEMTEST_SCRATCH CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 4 -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#undef CONFIG_AT91C_USE_RMII
include/configs/kb9202.h +7 -1
@@ -117,7 +117,13 @@#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM#define CONFIG_SYS_MEMTEST_END CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - (512*1024) -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#define CONFIG_SYS_FLASH_BASE 0x10000000
include/configs/m501sk.h +8 -1
@@ -36,6 +36,7 @@#define AT91C_MASTER_CLOCK 59904000#define AT91_SLOW_CLOCK 32768/* slow clock */ +#define CONFIG_AT91RM9200 1/* It's an Atmel AT91RM9200 SoC */ #define CONFIG_AT91RM9200DK 1/* on an AT91RM9200DK Board */ #undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ #define CONFIG_CMDLINE_TAG 1/* enable passing of ATAGs */
@@ -168,7 +169,13 @@/* CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144 */ #define CONFIG_SYS_MEMTEST_END 0x00100000 -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#define CONFIG_AT91C_USE_RMII
include/configs/mp2usb.h +7 -1
@@ -183,7 +183,13 @@#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM#define CONFIG_SYS_MEMTEST_END CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144 -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#undef CONFIG_AT91C_USE_RMII
include/netdev.h +1 -0
@@ -42,6 +42,7 @@ int cpu_eth_init(bd_t *bis);/* Driver initialization prototypes */ int au1x00_enet_initialize (bd_t *); +int at91emac_register (bd_t *bis,unsigned long iobase);int bfin_EMAC_initialize (bd_t *bis);int cs8900_initialize (u8 dev_num,int base_addr);int dc21x4x_initialize (bd_t *bis);
PATCH v3 8/9 new at91_emac network driver (NET_MULTI api)
Quoted 7 lines · Jens Scharsig
* add's
at91_emac(AT91RM9200) network driver (NET_MULTIapi)
* enable driver withCONFIG_DRIVER_AT91EMAC
* generic PHY initialization
* modify AT91RM9200 boards to useNET_MULTIdriver
* the drivers has been tested with LXT971 Phy and DM9161 Phy at MII and RMII interface
This is a NET patch so I am passing this off..
Small ws problems.
Similar 'memset blob copyright'
Tom
Ben Warren
AppliedPATCH v3 8/9 new at91_emac network driver (NET_MULTI api)
In reply to Jens ScharsigHi Jens,
Quoted 9 lines · Jens Scharsig
* add's
at91_emac(AT91RM9200) network driver (NET_MULTIapi)
* enable driver withCONFIG_DRIVER_AT91EMAC
* generic PHY initialization
* modify AT91RM9200 boards to useNET_MULTIdriver
* the drivers has been tested with LXT971 Phy and DM9161 Phy at MII and RMII interfaceSigned-off-by Jens Scharsig <[email protected]>---
Applied to net repo.
thanks,
Ben
PATCH v4 8/9 new at91_emac network driver (NET_MULTI api)
In reply to Jens Scharsig * add's at91_emac (AT91RM9200) network driver (NET_MULTI api)
* enable driver with CONFIG_DRIVER_AT91EMAC
* generic PHY initialization
* modify AT91RM9200 boards to use NET_MULTI driver
* the drivers has been tested with LXT971 Phy and DM9161 Phy at MII and RMII interface
---
(at) Ben Warren: not Changes since V3
README | 10 + board/atmel/at91rm9200dk/at91rm9200dk.c | 15 + board/atmel/at91rm9200ek/at91rm9200ek.c | 14 + board/cmc_pu2/cmc_pu2.c | 13 + board/csb637/csb637.c | 13 + board/eukrea/cpuat91/cpuat91.c | 14 + board/kb9202/kb9202.c | 13 + board/m501sk/m501sk.c | 14 + board/mp2usb/mp2usb.c | 13 + cpu/arm920t/at91rm9200/bcm5221.c | 4 +- cpu/arm920t/at91rm9200/dm9161.c | 3 +- drivers/net/Makefile | 1 + drivers/net/at91_emac.c | 498 +++++++++++++++++++++++++++++++ include/asm-arm/arch-at91/at91_emac.h | 143 +++++++++ include/configs/at91rm9200dk.h | 9 +- include/configs/at91rm9200ek.h | 8 +- include/configs/cmc_pu2.h | 8 +- include/configs/cpuat91.h | 8 +- include/configs/csb637.h | 8 +- include/configs/kb9202.h | 8 +- include/configs/m501sk.h | 9 +- include/configs/mp2usb.h | 8 +- include/netdev.h | 1 + 23 files changed, 823 insertions(+), 12 deletions(-) create mode 100644 drivers/net/at91_emac.c create mode 100644 include/asm-arm/arch-at91/at91_emac.h
README +10 -0
@@ -822,6 +822,16 @@ The following options need to be configured: - NETWORK Support (other): + CONFIG_DRIVER_AT91EMAC + Support for AT91RM9200 EMAC. + + CONFIG_RMII + Define this to use reduced MII inteface + + CONFIG_DRIVER_AT91EMAC_QUIET + If this defined, the driver is quiet. + The driver doen't show link status messages. + CONFIG_DRIVER_LAN91C96 Support for SMSC's LAN91C96 chips.
board/atmel/at91rm9200dk/at91rm9200dk.c +15 -0
@@ -23,9 +23,15 @@*/ #include <common.h> +#include <exports.h> +#include <netdev.h> #include <asm/arch/AT91RM9200.h> +#include <asm/io.h> + +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <dm9161.h> +#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -95,6 +101,15 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)#endif #endif /* CONFIG_DRIVER_ETHER */ +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif +/* * Disk On Chip (NAND) Millenium initialization. * The NAND lives in the CS2* space
board/atmel/at91rm9200ek/at91rm9200ek.c +14 -0
@@ -23,9 +23,14 @@*/ #include <common.h> +#include <exports.h> +#include <netdev.h> #include <asm/arch/AT91RM9200.h> +#include <asm/io.h> +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <dm9161.h> +#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -84,3 +89,12 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops) p_phyops->AutoNegotiate = dm9161_AutoNegotiate; }#endif + +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif
board/cmc_pu2/cmc_pu2.c +13 -0
@@ -30,8 +30,12 @@#include <common.h> #include <asm/mach-types.h> #include <asm/arch/AT91RM9200.h> +#include <asm/io.h> +#include <netdev.h> +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <dm9161.h> +#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -177,3 +181,12 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)#endif #endif /* CONFIG_DRIVER_ETHER */ + +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif
board/csb637/csb637.c +13 -0
@@ -23,8 +23,12 @@#include <common.h> #include <asm/arch/AT91RM9200.h> +#include <netdev.h> +#include <asm/io.h> +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <bcm5221.h> +#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -79,3 +83,12 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)#endif #endif /* CONFIG_DRIVER_ETHER */ + +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif
board/eukrea/cpuat91/cpuat91.c +14 -0
@@ -26,9 +26,14 @@*/ #include <common.h> +#include <netdev.h> #include <asm/arch/AT91RM9200.h> +#include <asm/io.h> + +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <ks8721.h> +#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -79,3 +84,12 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)#endif /* CONFIG_CMD_NET */ #endif /* CONFIG_DRIVER_ETHER */ +#ifdef CONFIG_DRIVER_AT91EMAC + +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif
board/kb9202/kb9202.c +13 -0
@@ -28,8 +28,12 @@#include <common.h> #include <asm/arch/AT91RM9200.h> +#include <asm/io.h> +#include <netdev.h> +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <lxt971a.h> +#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -92,3 +96,12 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)#endif #endif /* CONFIG_DRIVER_ETHER */ + +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif
board/m501sk/m501sk.c +14 -0
@@ -24,8 +24,13 @@*/ #include <common.h> +#include <asm/io.h> +#include <netdev.h> +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <dm9161.h> +#endif +#include "m501sk.h" #include "net.h"
@@ -186,4 +191,13 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops) }#endif /* CONFIG_CMD_NET */ #endif /* CONFIG_DRIVER_ETHER */ + +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif #endif /* CONFIG_M501SK */
board/mp2usb/mp2usb.c +13 -0
@@ -27,8 +27,12 @@#include <common.h> #include <asm/arch/AT91RM9200.h> +#include <netdev.h> +#include <asm/io.h> +#if defined(CONFIG_DRIVER_ETHER )#include <at91rm9200_net.h> #include <dm9161.h> +#endif #include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -83,3 +87,12 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)#endif #endif /* CONFIG_DRIVER_ETHER */ + +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init (bd_t *bis) +{ +int rc =0 ; + rc =at91emac_register (bis,0 ); +return rc; +} +#endif
cpu/arm920t/at91rm9200/bcm5221.c +2 -2
@@ -28,10 +28,10 @@#include <at91rm9200_net.h> #include <net.h> -#include <bcm5221.h> -#ifdef CONFIG_DRIVER_ETHER +#include <bcm5221.h> +#if defined(CONFIG_CMD_NET )/*
cpu/arm920t/at91rm9200/dm9161.c +1 -2
@@ -23,9 +23,8 @@#include <at91rm9200_net.h> #include <net.h> -#include <dm9161.h> -#ifdef CONFIG_DRIVER_ETHER +#include <dm9161.h> #if defined(CONFIG_CMD_NET )
drivers/net/Makefile +1 -0
@@ -27,6 +27,7 @@ LIB := $(obj)libnet.a COBJS-$(CONFIG_DRIVER_3C589) += 3c589.o COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o +COBJS-$(CONFIG_DRIVER_AT91EMAC) += at91_emac.o COBJS-$(CONFIG_DRIVER_AX88180) += ax88180.o COBJS-$(CONFIG_BCM570x) += bcm570x.o bcm570x_autoneg.o 5701rls.o COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o
drivers/net/at91_emac.c new file +498 -0
498 lines not on this page · raw message
include/asm-arm/arch-at91/at91_emac.h new file +143 -0
143 lines not on this page · raw message
include/configs/at91rm9200dk.h +8 -1
@@ -124,7 +124,14 @@#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM#define CONFIG_SYS_MEMTEST_END CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144 -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif +#define CONFIG_NET_RETRY_COUNT 20#define CONFIG_AT91C_USE_RMII
include/configs/at91rm9200ek.h +7 -1
@@ -147,7 +147,13 @@/* * Network Driver Setting */ -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#define CONFIG_AT91C_USE_RMII
include/configs/cmc_pu2.h +7 -1
@@ -154,7 +154,13 @@#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM#define CONFIG_SYS_MEMTEST_END CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144 -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#define CONFIG_AT91C_USE_RMII
include/configs/cpuat91.h +7 -1
@@ -130,7 +130,13 @@#define CONFIG_SYS_MEMTEST_END \ (CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 512 * 1024) -#define CONFIG_DRIVER_ETHER 1 +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#define CONFIG_AT91C_USE_RMII 1#define CONFIG_PHY_ADDRESS (1 << 5)
include/configs/csb637.h +7 -1
@@ -128,7 +128,13 @@#define CONFIG_SYS_ALT_MEMTEST 1#define CONFIG_SYS_MEMTEST_SCRATCH CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 4 -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#undef CONFIG_AT91C_USE_RMII
include/configs/kb9202.h +7 -1
@@ -117,7 +117,13 @@#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM#define CONFIG_SYS_MEMTEST_END CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - (512*1024) -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#define CONFIG_SYS_FLASH_BASE 0x10000000
include/configs/m501sk.h +8 -1
@@ -36,6 +36,7 @@#define AT91C_MASTER_CLOCK 59904000#define AT91_SLOW_CLOCK 32768/* slow clock */ +#define CONFIG_AT91RM9200 1/* It's an Atmel AT91RM9200 SoC */ #define CONFIG_AT91RM9200DK 1/* on an AT91RM9200DK Board */ #undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ #define CONFIG_CMDLINE_TAG 1/* enable passing of ATAGs */
@@ -168,7 +169,13 @@/* CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144 */ #define CONFIG_SYS_MEMTEST_END 0x00100000 -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#define CONFIG_AT91C_USE_RMII
include/configs/mp2usb.h +7 -1
@@ -183,7 +183,13 @@#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM#define CONFIG_SYS_MEMTEST_END CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144 -#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_MULTI 1 +#ifdef CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC 1 +#define CONFIG_SYS_RX_ETH_BUFFER 8 +#else +#define CONFIG_DRIVER_ETHER 1 +#endif #define CONFIG_NET_RETRY_COUNT 20#undef CONFIG_AT91C_USE_RMII
include/netdev.h +1 -0
@@ -42,6 +42,7 @@ int cpu_eth_init(bd_t *bis);/* Driver initialization prototypes */ int au1x00_enet_initialize (bd_t *); +int at91emac_register (bd_t *bis,unsigned long iobase);int bfin_EMAC_initialize (bd_t *bis);int cs8900_initialize (u8 dev_num,int base_addr);int dc21x4x_initialize (bd_t *bis);
Signature · 1 line
1.6.0.2