本次网卡移植参考国嵌实验

在include/configs/tq2440.h中

58行左右 / modified by ptz , for tq2440, dm9000 /

define CONFIG_DRIVER_CS8900 1 / we have a CS8900 on-board /

//#define NETWORK_DRIVER_CS8900 1

define NETWORK_DRIVER_DM9000 1

if defined (NETWORK_DRIVER_CS8900)

define CS8900_BASE 0x19000300

define CS8900_BUS16 1 / the Linux driver does accesses as shorts /

elif defined (NETWORK_DRIVER_DM9000)

define CONFIG_DRIVER_DM9000 1

define CONFIG_DM9000_USE_16BIT 1

define CONFIG_DM9000_BASE 0x20000300

define DM9000_IO 0x20000300

define DM9000_DATA 0x20000304

endif

112行左右 / add by ptz, for tq2440, PING CMD/

define CONFIG_CMD_PING

119行左右 / modified by ptz , for tq2440, dm9000 /

define CONFIG_IPADDR 192.168.1.105

define CONFIG_SERVERIP 192.168.1.103

define CONFIG_ETHADDR 00.01.02.03.04.05

在打开 driver/net/dm9000x.c 吧MII接口的注释掉 388行左右 / delete by ptz, for tq2440, for dm9000 /

if 0

i = 0; while (!(phy_read(1) & 0x20)) { / autonegation complete bit / udelay(1000); i++; if (i == 10000) { printf("could not establish link\n"); return 0; } } / see what we've got / lnk = phy_read(17) >> 12; printf("operating at "); switch (lnk) { case 1: printf("10M half duplex "); break; case 2: printf("10M full duplex "); break; case 4: printf("100M half duplex "); break; case 8: printf("100M full duplex "); break; default: printf("unknown: %d ", lnk); break; } printf("mode\n");

endif

这样就修改好了

标签: boot

添加新评论