bf561的u-boot下DM9000E网卡驱动移植

u-boot版本: u-boot-2008.10-2009R1-rc3.tar.gz

1. 修改locate at u-boot/include/configs/bf561-ezkit.h,屏蔽SMC91111网卡,并添加DM9000。

/*
 * Network Settings
 */
/****
#define ADI_CMDS_NETWORK 1
#define CONFIG_DRIVER_SMC91111 1
#define CONFIG_SMC91111_BASE 0x2C010300
#define CONFIG_SMC_USE_32_BIT 1
#define CONFIG_HOSTNAME  bf561-ezkit
****/
/* Uncomment next line to use fixed MAC address */
/* #define CONFIG_ETHADDR 02:80:ad:20:31:e8 */

#define ADI_CMDS_NETWORK 1
#define CONFIG_DRIVER_DM9000 1
#define CONFIG_DM9000_BASE 0x2C020000

#define DM9000_IO CONFIG_DM9000_BASE
#define DM9000_DATA (CONFIG_DM9000_BASE + 0x10)

#if (CONFIG_DRIVER_DM9000)
#define CONFIG_DM9000_USE_16BIT  1
#define CONFIG_ETHADDR 08:00:3e:26:0a:5b 
#define CONFIG_HOSTNAME BF561-ezkit
#endif

2. 修改u-boot/drivers/net/dm9000x.c文件,注释以下代码,并在每个读写函数后(inb,inw,inl,outb,outw,outl )添加延时语句asm("ssync;");才能实习正常网络通信。

 /* Set Node address */
// for (i = 0; i < 6; i++)
//  ((u16 *) bd->bi_enetaddr)[i] = read_srom_word(i);

3. 编译u-boot生成u-boot.bin,通过flashprogrammer将其写入ROM,ping主机可能不通,但tftp是可以的。下面是修改好的dm9000的u-boot下的驱动。

修改好的u-boot下dm9000驱动:/Files/rockstone/u-boot_DM9000.rar

转载于:https://www.cnblogs.com/rockstone/archive/2010/02/09/1666734.html

你可能感兴趣的:(bf561的u-boot下DM9000E网卡驱动移植)